/* ========================================
   SHOP – Ready to Buy Grid & Product Page
   Inspired by O bag / Locco Designs
   ======================================== */

/* --- Shop Section on Homepage --- */
.shop-section {
    padding: 5rem 0 4rem;
    background: #fff;
}

.shop-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.shop-section-header .shop-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: .75rem;
    position: relative;
}

.shop-section-header .shop-label::before,
.shop-section-header .shop-label::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background: var(--primary);
    vertical-align: middle;
    margin: 0 .75rem;
    opacity: .5;
}

.shop-section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: .6rem;
}

.shop-section-header p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Product Grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Product Card */
.shop-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all var(--duration) var(--ease);
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.shop-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.shop-card-img {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--bg-page);
}

.shop-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.shop-card:hover .shop-card-img img {
    transform: scale(1.08);
}

.shop-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: .3rem .7rem;
    background: var(--primary);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 6px;
    z-index: 2;
}

.shop-card-badge.new { background: #22c55e; }
.shop-card-badge.sale { background: #e74c3c; }

.shop-card-quick {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: .8rem;
    background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
    display: flex;
    justify-content: center;
    transform: translateY(100%);
    transition: transform .3s ease;
}

.shop-card:hover .shop-card-quick {
    transform: translateY(0);
}

.shop-card-quick span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.2rem;
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: .78rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.shop-card-body {
    padding: 1rem 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-card-name {
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: .25rem;
    line-height: 1.35;
}

.shop-card-desc {
    font-size: .76rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: .65rem;
    flex: 1;
}

.shop-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shop-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
}

.shop-card-price .old-price {
    text-decoration: line-through;
    color: #bbb;
    font-size: .82rem;
    font-weight: 400;
    margin-right: .3rem;
}

.shop-card-colors {
    display: flex;
    gap: 5px;
}

.shop-card-colors span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    transition: transform .2s ease;
}

.shop-card-colors span:hover {
    transform: scale(1.3);
}

.shop-view-all {
    text-align: center;
    margin-top: 2.5rem;
}

.shop-view-all a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 2rem;
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--duration) var(--ease);
    background: transparent;
}

.shop-view-all a:hover {
    background: var(--text-primary);
    color: #fff;
}

.shop-view-all a i {
    transition: transform .2s ease;
}

.shop-view-all a:hover i {
    transform: translateX(4px);
}

/* --- Product Detail Page --- */
.product-page {
    padding: 2rem 0 4rem;
    background: var(--bg-page);
    min-height: 70vh;
}

.product-breadcrumb {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
}

.product-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}

.product-breadcrumb a:hover { color: var(--primary); }

.product-breadcrumb .sep { color: #ccc; }

.product-breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Product Gallery */
.product-gallery {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.product-gallery-main {
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
    background: var(--bg-page);
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.product-gallery-main:hover img {
    transform: scale(1.05);
}

.product-gallery-thumbs {
    display: flex;
    gap: .5rem;
    padding: .75rem;
    overflow-x: auto;
}

.product-gallery-thumbs img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .2s ease;
    opacity: .6;
}

.product-gallery-thumbs img:hover,
.product-gallery-thumbs img.active {
    border-color: var(--primary);
    opacity: 1;
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-info-badges {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.product-info-badges span {
    padding: .3rem .7rem;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.product-info-badges .badge-new { background: #dcfce7; color: #16a34a; }
.product-info-badges .badge-popular { background: #fef3c7; color: #d97706; }
.product-info-badges .badge-limited { background: #fee2e2; color: #dc2626; }

.product-info h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.product-info-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.product-info-price .orig {
    text-decoration: line-through;
    color: #bbb;
    font-size: 1.1rem;
    font-weight: 400;
    margin-left: .5rem;
}

.product-info-desc {
    font-size: .92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.product-info-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.product-feature-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    color: var(--text-secondary);
}

.product-feature-item i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,107,107,.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    flex-shrink: 0;
}

/* Size Selector */
.product-size-section { }

.product-size-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: .65rem;
    display: block;
}

.product-size-grid {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.product-size-btn {
    padding: .55rem 1.1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    min-width: 52px;
    text-align: center;
}

.product-size-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.product-size-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255,107,107,.3);
}

.product-size-btn .size-extra {
    display: block;
    font-size: .65rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
}

.product-size-btn.active .size-extra { color: rgba(255,255,255,.8); }

/* Quantity */
.product-qty-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-qty-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.product-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.product-qty-control button {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--bg-card);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    font-family: inherit;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-qty-control button:hover {
    background: rgba(255,107,107,.08);
    color: var(--primary);
}

.product-qty-control span {
    width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: .92rem;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    line-height: 38px;
}

/* Add to Cart */
.product-add-cart {
    display: flex;
    gap: .75rem;
}

.product-add-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    box-shadow: 0 4px 18px rgba(255,107,107,.3);
}

.product-add-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255,107,107,.4);
}

.product-add-btn:active {
    transform: translateY(0);
}

.product-wishlist-btn {
    width: 52px;
    height: 52px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all var(--duration) var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-wishlist-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.product-wishlist-btn.active {
    color: var(--primary);
    background: rgba(255,107,107,.06);
    border-color: var(--primary);
}

/* Trust badges */
.product-trust {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
}

.product-trust-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    color: var(--text-muted);
}

.product-trust-item i {
    color: #22c55e;
    font-size: .85rem;
}

/* Custom Design CTA at bottom of product page */
.product-custom-cta {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(255,107,107,.06), rgba(255,200,26,.06));
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255,107,107,.3);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-custom-cta i {
    font-size: 1.5rem;
    color: var(--primary);
}

.product-custom-cta-text {
    flex: 1;
}

.product-custom-cta-text strong {
    display: block;
    font-size: .85rem;
    color: var(--text-primary);
    margin-bottom: .15rem;
}

.product-custom-cta-text span {
    font-size: .75rem;
    color: var(--text-muted);
}

.product-custom-cta a {
    padding: .45rem 1rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
}

.product-custom-cta a:hover {
    background: var(--primary-dark);
}

/* Toast */
.shop-toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.shop-toast {
    padding: .75rem 1.25rem;
    background: #1a1a2e;
    color: #fff;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    animation: shopToastIn .3s ease;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.shop-toast.success { background: #16a34a; }
.shop-toast.out { opacity: 0; transform: translateX(20px); transition: all .3s ease; }

.shop-toast i { font-size: 1rem; }

@keyframes shopToastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .shop-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .shop-section { padding: 3rem 0; }
    .shop-section-header h2 { font-size: 1.6rem; }
    .product-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .product-gallery { position: static; }
    .product-info h1 { font-size: 1.4rem; }
    .product-info-features { grid-template-columns: 1fr; }
    .product-trust { flex-direction: column; gap: .75rem; }
}

@media (max-width: 480px) {
    .shop-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
    .shop-card-body { padding: .75rem .85rem 1rem; }
    .shop-card-name { font-size: .82rem; }
    .shop-card-price { font-size: .92rem; }
    .product-add-cart { flex-direction: column; }
    .product-wishlist-btn { width: 100%; }
}
