/* ===== Product page (show.html.twig) ===== */

.ps-product {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* Breadcrumb */
.ps-breadcrumb {
    font-size: 13px;
    color: #6b7785;
    margin-bottom: 16px;
}
.ps-breadcrumb a {
    color: #6b7785;
    text-decoration: none;
}
.ps-breadcrumb a:hover { color: #0d91d3; }
.ps-bc-sep { margin: 0 6px; color: #c1c8d1; }
.ps-bc-curr { color: #1a1a1a; }

/* Title + code */
.ps-prod-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.ps-prod-title {
    font-size: 22px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}
.ps-prod-code {
    font-size: 13px;
    color: #6b7785;
    white-space: nowrap;
}

/* Main grid: gallery 1fr | info 1fr | buy-box 320px */
.ps-prod-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
    gap: 28px;
    margin-bottom: 36px;
}

/* Gallery */
.ps-prod-gallery { min-width: 0; }
.ps-prod-main-img {
    width: 100%;
    aspect-ratio: 1;
    background: #f5f7fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
}
.ps-prod-main-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.ps-prod-main-img.ps-no-img { color: #aab2bd; font-size: 14px; }
.ps-prod-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ps-prod-thumb {
    width: 64px;
    height: 64px;
    border: 1px solid #e4e8ee;
    border-radius: 4px;
    background: #fff;
    padding: 4px;
    cursor: pointer;
    transition: border-color .15s ease;
}
.ps-prod-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ps-prod-thumb:hover { border-color: #0d91d3; }
.ps-prod-thumb.ps-active { border-color: #0d91d3; border-width: 2px; padding: 3px; }

/* Info: rating + variants + short desc */
.ps-prod-info { min-width: 0; }
.ps-prod-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.ps-stars {
    display: inline-flex;
    gap: 1px;
}
.ps-prod-reviews-link {
    font-size: 13px;
    color: #0d91d3;
    text-decoration: none;
}
.ps-prod-reviews-link:hover { text-decoration: underline; }

.ps-prod-variants { margin-bottom: 18px; }
.ps-prod-variants-label {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
}
.ps-prod-variants-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ps-prod-variant {
    border: 1px solid #d1d8e0;
    background: #fff;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 70px;
    transition: border-color .15s ease, background .15s ease;
}
.ps-prod-variant:hover { border-color: #0d91d3; }
.ps-prod-variant.ps-active {
    border-color: #0d91d3;
    background: #e8f4fb;
    border-width: 2px;
    padding: 7px 11px;
}
.ps-prod-variant-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}
.ps-prod-variant-price {
    font-size: 11px;
    color: #c0392b;
    font-weight: 500;
    margin-top: 2px;
}

.ps-prod-short {
    font-size: 14px;
    line-height: 1.6;
    color: #4a5562;
}

/* Buy box (right) */
.ps-buy-box {
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    height: fit-content;
    position: sticky;
    top: 20px;
}
/* Old strikethrough price (above the current price on PDP, when discounted).
   Mirrors the listing-card treatment so the buy-box reads the same way. */
.ps-buy-old-price {
    color: #8a8a8a;
    font-size: 15px;
    font-weight: 300;
    line-height: 1;
    text-decoration: line-through;
    text-decoration-color: #b5b5b5;
    margin-bottom: 6px;
}
.ps-buy-old-price .ps-buy-old-int { font-size: 15px; }
.ps-buy-old-price .ps-buy-old-dec {
    font-size: 11px;
    vertical-align: top;
    position: relative;
    top: 1px;
    margin-left: 1px;
}

/* "Economisești" line below "fara TVA" on PDP, only when discounted */
.ps-buy-savings {
    color: #555;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 4px;
    margin-bottom: 6px;
}
.ps-buy-savings strong {
    color: #c0392b;
    font-weight: 600;
}
.ps-buy-savings .ps-buy-save-dec {
    font-size: 10px;
    vertical-align: top;
    position: relative;
    top: 1px;
    margin-left: 1px;
}

.ps-buy-price {
    font-size: 32px;
    font-weight: 600;
    color: #c0392b;
    line-height: 1;
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}
.ps-buy-price-int {}
.ps-buy-price-dec { font-size: 18px; margin-top: 2px; }
.ps-buy-price-cur { font-size: 24px; margin-left: 6px; align-self: center; }
.ps-buy-price-na { font-size: 18px; color: #6b7785; font-weight: 400; }
.ps-buy-stock {
    font-size: 13px;
    color: #27ae60;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}
.ps-stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27ae60;
    display: inline-block;
}
.ps-buy-shipping {
    background: #e8f7ee;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    color: #1a1a1a;
    margin-bottom: 16px;
}
.ps-buy-shipping strong { color: #27ae60; }

.ps-buy-btn {
    width: 100%;
    background: #0d91d3;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    transition: background .15s ease;
}
.ps-buy-btn:hover { background: #0a7eb8; }
.ps-buy-btn-icon { display: inline-flex; }

.ps-fav-btn {
    width: 100%;
    background: #fff;
    color: #0d91d3;
    border: 1px solid #0d91d3;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    transition: background .15s ease, color .15s ease;
}
.ps-fav-btn:hover { background: #e8f4fb; }

.ps-buy-trust {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid #e4e8ee;
}
.ps-buy-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #4a5562;
}

/* Tabs */
.ps-prod-tabs {
    margin-top: 24px;
}
.ps-prod-tabs-nav {
    display: flex;
    border-bottom: 2px solid #e4e8ee;
    margin-bottom: 20px;
    gap: 4px;
    overflow-x: auto;
}
.ps-prod-tab {
    background: transparent;
    border: 0;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7785;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color .15s ease, border-color .15s ease;
}
.ps-prod-tab:hover { color: #0d91d3; }
.ps-prod-tab.ps-active {
    color: #0d91d3;
    border-bottom-color: #0d91d3;
}
.ps-prod-tab-content {
    display: none;
    font-size: 14px;
    line-height: 1.7;
    color: #2a2f36;
}
.ps-prod-tab-content.ps-active { display: block; }
.ps-prod-tab-content img { max-width: 100%; height: auto; }

.ps-prod-attrs {
    width: 100%;
    border-collapse: collapse;
}
.ps-prod-attrs th,
.ps-prod-attrs td {
    text-align: left;
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid #eef0f3;
}
.ps-prod-attrs th {
    font-weight: 500;
    color: #4a5562;
    width: 40%;
    background: #f8fafc;
}
.ps-prod-attrs td { color: #1a1a1a; }

/* Responsive */
@media (max-width: 1100px) {
    .ps-prod-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ps-buy-box {
        grid-column: 1 / -1;
        position: static;
    }
}
@media (max-width: 720px) {
    .ps-prod-grid { grid-template-columns: 1fr; }
    .ps-prod-title { font-size: 18px; }
    .ps-buy-price { font-size: 26px; }
    .ps-product { padding: 16px; }
}

/* Favorite button active state */
.ps-fav-btn.ps-fav-active {
    background: #0d91d3;
    color: #fff;
    border-color: #0d91d3;
}
.ps-fav-btn.ps-fav-active svg { color: #fff; }

/* Quantity input in buy-box */
.ps-buy-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.ps-buy-qty-label {
    font-size: 13px;
    color: #4a5562;
}
.ps-buy-qty-input input,
.ps-buy-qty-input .ps-qty-field {
    width: 70px;
    padding: 8px 10px;
    border: 1px solid #d1d8e0;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}
.ps-buy-qty-input input:focus {
    outline: none;
    border-color: #0d91d3;
}
.ps-out-of-stock {
    color: #c0392b;
    font-weight: 500;
    padding: 14px;
    background: #fdecea;
    border-radius: 6px;
    text-align: center;
}
.ps-add-cart-wrap .ps-buy-form > div + button,
.ps-add-cart-wrap form .alert {
    /* allow Sylius form errors to display */
    margin-bottom: 10px;
}

/* Wishlist /favorite page */
.ps-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.ps-wishlist-item {
    display: flex;
    gap: 14px;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}
.ps-wishlist-img {
    flex: 0 0 90px;
    width: 90px;
    height: 90px;
    background: #f5f7fa;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ps-wishlist-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ps-wishlist-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ps-wishlist-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ps-wishlist-name:hover { color: #0d91d3; }
.ps-wishlist-price {
    font-size: 16px;
    font-weight: 600;
    color: #c0392b;
    margin-bottom: 8px;
}
.ps-wishlist-remove {
    background: transparent;
    border: 0;
    color: #6b7785;
    font-size: 12px;
    padding: 0;
    cursor: pointer;
    text-align: left;
    align-self: flex-start;
    margin-top: auto;
}
.ps-wishlist-remove:hover { color: #c0392b; text-decoration: underline; }
