/* ==========================================================
   STORLY-STYLE PRODUCT CARDS & PRODUCT PAGE
   ========================================================== */

/* ===== Product Card V2 ===== */
.product-card-v2 {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}

.product-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8fafc;
}
.product-card-media-link { display: block; width: 100%; height: 100%; }
.product-card-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card-v2:hover .product-card-img { transform: scale(1.08); }

/* Badges */
.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}
.product-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fff;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.badge-discount { background: #ef4444; }
.badge-new { background: #10b981; }
.badge-oos { background: #64748b; }

/* Wishlist float button */
.product-wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: none;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s;
    z-index: 2;
}
.product-wishlist-btn:hover { background: #ef4444; color: #fff; transform: scale(1.1); }
.product-wishlist-btn.active { background: #ef4444; color: #fff; }
.product-wishlist-btn.active i::before { content: "\f415"; } /* filled heart */

/* Hover action buttons */
.product-card-hover-actions {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}
.product-card-v2:hover .product-card-hover-actions {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.hover-action-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: none;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: all 0.2s;
    font-size: 1.05rem;
}
.hover-action-btn:hover { background: #2563eb; color: #fff; transform: scale(1.1); }
.hover-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Info section */
.product-card-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}
.product-category-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2563eb;
    text-decoration: none;
}
.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    font-family: 'Inter', sans-serif;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-title a { color: #0f172a; text-decoration: none; }
.product-title a:hover { color: #2563eb; }

.product-rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}
.product-stars { display: flex; gap: 1px; color: #f59e0b; }
.product-stars i { font-size: 0.75rem; }
.product-rating-count { color: #64748b; font-size: 0.75rem; }

.product-price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.product-price { font-size: 1.15rem; font-weight: 700; color: #0f172a; font-family: 'Poppins', sans-serif; }
.product-price-old { font-size: 0.85rem; color: #94a3b8; text-decoration: line-through; }

.product-add-btn {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}
.product-add-btn:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37,99,235,0.28); }
.product-add-btn:disabled { background: #94a3b8; cursor: not-allowed; transform: none; box-shadow: none; }

/* ===== Product Single Page ===== */
.product-breadcrumbs { padding: 1.5rem 0; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.breadcrumb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.85rem; }
.breadcrumb-list li { display: flex; align-items: center; gap: 0.5rem; color: #64748b; }
.breadcrumb-list li::after { content: '/'; color: #cbd5e1; }
.breadcrumb-list li:last-child::after { display: none; }
.breadcrumb-list a { color: #64748b; text-decoration: none; }
.breadcrumb-list a:hover { color: #2563eb; }
.breadcrumb-list li.current { color: #0f172a; font-weight: 600; }

.product-detail-section { padding: 2.5rem 0 4rem; }

/* Gallery */
.product-gallery-v2 { position: sticky; top: 100px; }
.product-gallery-main {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 20px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.gallery-main-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-discount-badge {
    position: absolute;
    top: 16px; left: 16px;
    background: #ef4444;
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
}
.product-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    background: #fff;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover, .gallery-thumb.active { border-color: #2563eb; }

/* Info */
.product-info-v2 { padding: 0.5rem 0; }
.product-meta-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; font-size: 0.8rem; }
.product-meta-cat {
    background: #eff6ff;
    color: #2563eb;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
}
.product-meta-sku { color: #64748b; }

.product-detail-title {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 1rem;
}

.product-detail-rating { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.rating-verified { font-size: 0.85rem; color: #10b981; font-weight: 600; }

.product-detail-price-box {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.price-current { font-size: 2rem; font-weight: 800; color: #0f172a; font-family: 'Poppins', sans-serif; }
.price-old { font-size: 1.15rem; color: #94a3b8; text-decoration: line-through; }
.price-save { margin-left: auto; background: #fef3c7; color: #92400e; padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }

.product-detail-short { color: #475569; font-size: 1rem; line-height: 1.7; margin-bottom: 1.5rem; }

.product-stock-row { margin-bottom: 1.5rem; }
.stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}
.stock-in { background: #d1fae5; color: #065f46; }
.stock-out { background: #fee2e2; color: #991b1b; }

.product-action-bar { display: flex; gap: 12px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.qty-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}
.qty-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    transition: background 0.2s;
}
.qty-btn:hover { background: #f1f5f9; }
.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    outline: none;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input[type=number] { -moz-appearance: textfield; }

.btn-add-main {
    flex: 1;
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0 1.5rem;
    height: 48px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-add-main:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,0.3); }
.btn-add-main:disabled { background: #94a3b8; cursor: not-allowed; }

.btn-wishlist-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.15rem;
}
.btn-wishlist-icon:hover { border-color: #ef4444; color: #ef4444; }

/* Trust grid */
.product-trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.trust-item i { font-size: 1.4rem; }
.trust-item strong { display: block; color: #0f172a; font-size: 0.85rem; }
.trust-item small { color: #64748b; font-size: 0.75rem; }

/* Tabs */
.product-tabs-v2 { background: #fff; border-radius: 20px; border: 1px solid #e2e8f0; overflow: hidden; }
.product-tabs-nav {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0 1rem;
    gap: 0.25rem;
    flex-wrap: nowrap;
    overflow-x: auto;
}
.product-tabs-nav .nav-link {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    border-radius: 0;
    position: relative;
    white-space: nowrap;
    font-size: 0.9rem;
}
.product-tabs-nav .nav-link.active { color: #2563eb; background: transparent; }
.product-tabs-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 1rem; right: 1rem;
    height: 3px;
    background: #2563eb;
    border-radius: 3px 3px 0 0;
}
.product-tabs-content { padding: 2rem; }
.specs-table { width: 100%; }
.specs-table th { width: 200px; padding: 12px 0; color: #64748b; font-weight: 600; }
.specs-table td { padding: 12px 0; color: #0f172a; border-top: 1px solid #f1f5f9; }

/* Related */
.related-products-section { }
.section-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.section-header-row h2 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.view-all-link { color: #2563eb; text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.view-all-link:hover { text-decoration: underline; }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 767.98px) {
    .product-detail-title { font-size: 1.4rem; }
    .price-current { font-size: 1.6rem; }
    .product-action-bar { gap: 8px; }
    .btn-add-main { min-width: 0; font-size: 0.9rem; padding: 0 1rem; }
    .product-tabs-content { padding: 1.25rem; }
    .specs-table th { width: 120px; font-size: 0.85rem; }
    .product-trust-grid { grid-template-columns: 1fr; gap: 10px; padding: 1rem; }

    .product-card-info { padding: 0.75rem; }
    .product-title { font-size: 0.85rem; }
    .product-price { font-size: 1rem; }
    .product-add-btn { font-size: 0.78rem; padding: 0.55rem 0.75rem; }
    .product-add-btn span { display: inline; }
    .gallery-thumb { width: 60px; height: 60px; }
}