/* ================================================================
   Product Details Page V3 — Premium Redesign
   Graceful Motion Autospares
   ================================================================ */

/* ─── Breadcrumb Bar ─── */
.pd-breadcrumb-bar {
    background: #F8F8FA;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 10px 0;
}

.pd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.pd-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.pd-breadcrumb .fa-chevron-right {
    font-size: 0.6rem;
    opacity: 0.5;
}

.pd-breadcrumb .active {
    color: var(--accent-primary);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* ─── Main Layout ─── */
.pd-main {
    background: #FFFFFF;
    min-height: 60vh;
}

.pd-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 32px 24px; /* Reduced from 40px */
}

/* ─── Shimmer Loading ─── */
.pd-loading {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.pd-shimmer-img {
    height: 520px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 20px;
}

.pd-shimmer-info {
    padding-top: 20px;
}

.pd-shimmer-line {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 8px;
    margin-bottom: 12px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ─── Product Content Grid ─── */
.pd-content {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: start; /* Align to top, don't stretch */
}

/* ─── Left: Image Panel ─── */
.pd-image-panel {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-self: flex-start;
}

.pd-image-container {
    background: #F8F8FA;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    width: 100%;
    min-height: 500px;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.pd-image-container:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Stock badge - top right corner */
.pd-in-stock-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #27AE60 0%, #229954 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pd-in-stock-badge.low-stock {
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.pd-in-stock-badge i {
    font-size: 0.65rem;
}

/* Thumbnail gallery below main image */
.pd-thumbnail-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
}

.pd-thumbnail-strip::-webkit-scrollbar {
    height: 4px;
}

.pd-thumbnail-strip::-webkit-scrollbar-track {
    background: transparent;
}

.pd-thumbnail-strip::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
}

.pd-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: white;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-thumbnail:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pd-thumbnail.active {
    border-color: var(--accent-primary);
    border-width: 3px;
    box-shadow: 0 4px 16px rgba(211, 47, 47, 0.2);
}

.pd-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.pd-thumbnail.active img,
.pd-thumbnail:hover img {
    opacity: 1;
}

.pd-image-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    padding: 40px;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pd-image-slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-image-container.zoomed .pd-image-track {
    transform: scale(1.5) !important;
    cursor: zoom-out;
}

.pd-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.12));
    transition: transform 0.3s ease;
}

/* ─── Carousel Nav ─── */
.pd-carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    pointer-events: none;
    z-index: 5;
}

.pd-carousel-arrow {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.2s;
    color: var(--text-primary);
}

.pd-carousel-arrow:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}

.pd-carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.pd-dot {
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pd-dot.active {
    background: var(--accent-primary);
    width: 24px;
    border-radius: 10px;
}

.pd-zoom-hint {
    position: absolute;
    bottom: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    z-index: 6;
}

.pd-zoom-hint:hover {
    background: var(--accent-primary);
    color: white;
}

/* Zoomed image state */
#pdImageContainer.zoomed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 40px;
}

#pdImageContainer.zoomed .pd-image-track {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#pdImageContainer.zoomed .pd-image-slide {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: static;
}

#pdImageContainer.zoomed .pd-main-img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    position: static;
}

#pdImageContainer.zoomed .pd-zoom-hint {
    top: 20px;
    right: 20px;
    bottom: auto;
    background: rgba(255, 255, 255, 0.95);
}

#pdImageContainer.zoomed .pd-carousel-nav,
#pdImageContainer.zoomed .pd-carousel-dots,
#pdImageContainer.zoomed .pd-in-stock-badge {
    display: none;
}

/* ─── Right: Info Panel ─── */
.pd-info-panel {
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 18px; /* Reduced from 20px for tighter spacing */
}

.pd-category-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.pd-category-label a {
    color: var(--accent-primary);
    text-decoration: none;
}

.pd-category-label a:hover {
    text-decoration: underline;
}

.pd-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-primary);
    margin: 0;
}

.pd-rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    margin: -8px -12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.pd-rating-row:hover {
    background: rgba(211, 47, 47, 0.04);
}

.pd-stars {
    font-size: 1rem;
    color: var(--accent-primary);
    letter-spacing: 2px;
}

.pd-reviews {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

/* Reviews Section - Full Width Container Below Product Grid */
.pd-reviews-section {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 32px;
    margin-top: 48px;
    scroll-margin-top: 100px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
}

.pd-reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.pd-reviews-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.pd-reviews-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Desktop: Horizontal scrolling carousel */
.pd-reviews-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 4px 4px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(211, 47, 47, 0.3) transparent;
}

.pd-reviews-grid::-webkit-scrollbar {
    height: 6px;
}

.pd-reviews-grid::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.04);
    border-radius: 3px;
}

.pd-reviews-grid::-webkit-scrollbar-thumb {
    background: rgba(211, 47, 47, 0.3);
    border-radius: 3px;
}

.pd-reviews-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(211, 47, 47, 0.5);
}

.pd-review-card {
    background: #F8F8FA;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 340px; /* Fixed width for horizontal scroll */
    min-width: 340px;
    max-width: 340px;
    scroll-snap-align: start;
}

.pd-review-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.pd-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pd-review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.2);
}

.pd-review-meta {
    flex: 1;
    min-width: 0;
}

.pd-review-author {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.pd-review-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.pd-review-stars {
    color: var(--accent-primary);
    font-size: 0.8rem;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.pd-review-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pd-review-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: white;
    background: linear-gradient(135deg, #27AE60 0%, #229954 100%);
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.2);
    align-self: flex-start;
}

.pd-review-verified i {
    font-size: 0.75rem;
}

/* Mobile: Vertical stack */
@media (max-width: 768px) {
    .pd-reviews-grid {
        flex-direction: column;
        overflow-x: visible;
        scroll-snap-type: none;
    }
    
    .pd-review-card {
        flex: 1;
        min-width: 100%;
        max-width: 100%;
    }
    
    .pd-reviews-section {
        padding: 20px;
    }
}

.pd-price-block {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pd-price {
    font-family: var(--font-display);
    font-size: 3.2rem; /* Larger, more dominant */
    font-weight: 900; /* Extra bold */
    color: #d32f2f; /* Red accent to draw attention */
    line-height: 1;
    text-shadow: 0 2px 4px rgba(211, 47, 47, 0.1);
}

.pd-delivery-estimate {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #27AE60;
    font-weight: 600;
    background: rgba(39, 174, 96, 0.08);
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.pd-delivery-estimate i {
    font-size: 1rem;
}

.pd-free-delivery {
    font-size: 0.75rem;
    color: #27AE60;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pd-description {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0;
}

/* ─── View More Oils Box (for Gear & Engine Oils products) ─── */
.pd-view-more-oils-box {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(22, 160, 133, 0.05) 0%, rgba(22, 160, 133, 0.12) 100%);
    border-radius: 12px;
    border-left: 4px solid #16a085;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.pd-oils-message {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: #2c3e50;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.pd-oils-message i {
    color: #16a085;
    margin-top: 2px;
    flex-shrink: 0;
}

.pd-view-more-oils-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #16a085;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(22, 160, 133, 0.25);
}

.pd-view-more-oils-btn:hover {
    background: #138871;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 160, 133, 0.35);
}

.pd-view-more-oils-btn i:first-child {
    font-size: 1rem;
}

.pd-view-more-oils-btn i:last-child {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.pd-view-more-oils-btn:hover i:last-child {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .pd-view-more-oils-box {
        padding: 1.25rem;
    }
    
    .pd-oils-message {
        font-size: 0.9rem;
    }
    
    .pd-view-more-oils-btn {
        font-size: 0.85rem;
        padding: 10px 20px;
    }
}

/* ─── Specs Box (Enhanced with Alternating Rows) ─── */
.pd-specs-box {
    background: #F8F8FA;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.pd-specs-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    background: white;
}

.pd-specs-grid {
    padding: 0; /* Remove padding for alternating rows */
}

.pd-spec-row {
    display: flex;
    gap: 16px;
    padding: 12px 20px;
    font-size: 0.88rem;
    align-items: baseline;
}

/* Alternating row shading - Apple/Shopify standard */
.pd-spec-row:nth-child(even) {
    background: white;
}

.pd-spec-row:nth-child(odd) {
    background: rgba(0, 0, 0, 0.02);
}

.pd-spec-key {
    font-weight: 600;
    color: #6B7280; /* Muted gray label */
    min-width: 120px;
    max-width: 140px;
    flex-shrink: 0;
}

.pd-spec-val {
    color: var(--text-primary); /* Dark value */
    font-weight: 600;
    flex: 1;
    word-break: break-word;
}

/* Mobile: Stack on very narrow screens */
@media (max-width: 480px) {
    .pd-spec-row {
        flex-direction: column;
        gap: 4px;
        padding: 10px 16px;
    }
    
    .pd-spec-key {
        min-width: 0;
        font-size: 0.75rem;
    }
    
    .pd-spec-val {
        font-size: 0.85rem;
    }
}

/* ─── Trust Badges (Icon-on-Top Grid) ─── */
.pd-trust-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.pd-trust-item {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    min-height: 100px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.pd-trust-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: rgba(211, 47, 47, 0.2);
}

.pd-trust-item i {
    font-size: 1.4rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.pd-trust-item span {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile: 2x2 Grid */
@media (max-width: 768px) {
    .pd-trust-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .pd-trust-item {
        padding: 16px 10px;
        min-height: 90px;
    }
    
    .pd-trust-item i {
        font-size: 1.5rem;
    }
    
    .pd-trust-item span {
        font-size: 0.7rem;
    }
}

/* ─── Action Area (Desktop + Mobile Optimization) ─── */
.pd-action-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Mobile: Stacked Action Buttons for Better UX */
@media (max-width: 768px) {
    .pd-action-area {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding: 0 16px;
    }
    
    .pd-qty-group {
        display: flex; /* Show quantity on mobile */
        width: 100%;
        justify-content: center;
        border-radius: 10px;
    }
    
    .pd-qty-btn {
        width: 50px;
        height: 48px;
        font-size: 1.4rem;
    }
    
    .pd-qty-input {
        width: 70px;
        height: 48px;
        font-size: 1.1rem;
    }
    
    .pd-btn-cart,
    .pd-btn-wa,
    .pd-btn-call {
        width: 100%;
        min-width: 0;
        height: 54px;
        padding: 14px 20px;
        font-size: 0.9rem;
        font-weight: 800;
        border-radius: 10px;
        justify-content: center;
        gap: 10px;
    }
    
    .pd-btn-cart {
        order: 1;
    }
    
    .pd-btn-wa {
        order: 2;
    }
    
    .pd-btn-call {
        order: 3;
    }
    
    .pd-btn-cart i,
    .pd-btn-wa i,
    .pd-btn-call i {
        font-size: 1.1rem;
    }
    
    .pd-btn-cart span,
    .pd-btn-wa span,
    .pd-btn-call span {
        font-size: 0.9rem;
        letter-spacing: 0.5px;
    }
    
    /* Make WhatsApp and Call buttons more prominent on mobile */
    .pd-btn-wa {
        background: #25D366;
        color: white;
        border: 2px solid #25D366;
    }
    
    .pd-btn-wa:active {
        background: #1EB154;
        border-color: #1EB154;
    }
    
    .pd-btn-call {
        background: #d32f2f;
        color: white;
        border: 2px solid #d32f2f;
    }
    
    .pd-btn-call:active {
        background: #c62828;
        border-color: #c62828;
    }
}

.pd-qty-group {
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.pd-qty-btn {
    width: 44px;
    height: 50px;
    border: none;
    background: transparent;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-qty-btn:hover {
    background: rgba(184, 134, 11, 0.08);
    color: var(--accent-primary);
}

.pd-qty-input {
    width: 52px;
    height: 50px;
    border: none;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: transparent;
    -moz-appearance: textfield;
    appearance: none;
}

.pd-qty-input::-webkit-outer-spin-button,
.pd-qty-input::-webkit-inner-spin-button {
    display: none;
}

.pd-btn-cart {
    flex: 1;
    min-width: 200px;
    height: 52px;
    border-radius: 8px;
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: white;
    border: none;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.25);
}

.pd-btn-cart:hover {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.35);
}

.pd-btn-cart i {
    font-size: 1.1rem;
}

.pd-btn-wa {
    height: 52px;
    padding: 0 20px;
    border-radius: 8px;
    background: transparent;
    color: #25D366;
    border: 2px solid #25D366;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.pd-btn-wa:hover {
    background: #25D366;
    color: white;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.pd-btn-call {
    height: 52px;
    padding: 0 20px;
    border-radius: 8px;
    background: transparent;
    color: #d32f2f;
    border: 2px solid #d32f2f;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    white-space: nowrap;
    text-decoration: none;
}

.pd-btn-call:hover {
    background: #d32f2f;
    color: white;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

.pd-btn-wa i,
.pd-btn-call i {
    font-size: 1rem;
}

.pd-wa-note {
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: rgba(37, 211, 102, 0.06);
    border: 1px solid rgba(37, 211, 102, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    margin: 0;
    line-height: 1.5;
}

/* ─── Error State ─── */
.pd-error {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.pd-error-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.pd-error h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.pd-error p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.pd-back-btn {
    display: inline-block;
    background: var(--accent-primary);
    color: white;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}

/* ─── Related Products Section ─── */
.pd-related {
    padding: 40px 0 60px; /* Reduced top padding from 60px to 40px */
    background: #F8F8FA;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.pd-related-header {
    text-align: center;
    margin-bottom: 32px; /* Reduced from 40px */
}

.pd-related-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 8px;
}

/* ─── Related Products Carousel (Mobile-First Apple/Shopify Style) ─── */
.pd-related .product-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 8px 20px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

/* Hide scrollbar but keep functionality */
.pd-related .product-grid::-webkit-scrollbar {
    display: none;
}

/* Cards in carousel - consistent sizing */
.pd-related .product-card {
    flex: 0 0 45vw; /* ~45% viewport width so next card peeks */
    min-width: 280px; /* Minimum card width */
    max-width: 340px; /* Maximum card width */
    scroll-snap-align: start;
}

/* Fix image consistency in related products */
.pd-related .product-card .product-img-wrap {
    aspect-ratio: 1 / 1; /* Force square */
    background: #F8F8FA;
    border-radius: 12px;
    padding: 20px; /* Padding so image doesn't touch edges */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pd-related .product-card .product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Contain keeps product fully visible */
    transition: transform 0.3s ease;
}

.pd-related .product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}

/* Desktop: Show grid instead of carousel */
@media (min-width: 769px) {
    .pd-related .product-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        overflow-x: visible;
        scroll-snap-type: none;
        padding: 0;
    }
    
    .pd-related .product-card {
        flex: none;
        max-width: none;
    }
}

/* ─── Mobile Sticky Bar (Backup/Scroll Actions) ─── */
.pd-sticky-bar {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 65px; /* Above mobile-bottom-nav */
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 10px 16px;
    gap: 10px;
    z-index: 4000;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Show sticky bar on scroll (mobile only) */
@media (max-width: 768px) {
    .pd-sticky-bar {
        display: flex;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .pd-sticky-bar.active {
        transform: translateY(0);
    }
}

.pd-sticky-btn {
    flex: 1;
    height: 52px;
    border-radius: 10px;
    border: none;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pd-sticky-btn i {
    font-size: 1.2rem;
}

.pd-sticky-btn span {
    font-size: 0.65rem;
    font-weight: 800;
}

.pd-sticky-cart {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: white;
}

.pd-sticky-cart:active {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
}

.pd-sticky-wa {
    background: #25D366;
    color: white;
    text-decoration: none;
}

.pd-sticky-wa:active {
    background: #1EB154;
}

.pd-sticky-call {
    background: #d32f2f;
    color: white;
    text-decoration: none;
}

.pd-sticky-call:active {
    background: #c62828;
}

/* ================================================================
   RESPONSIVE — MOBILE
   ================================================================ */
@media (max-width: 900px) {

    .pd-content,
    .pd-loading {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .pd-image-panel {
        position: static;
    }

    .pd-image-wrap {
        aspect-ratio: 4/3;
        max-height: 420px;
        margin: 0 -8px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

@media (max-width: 768px) {
    .pd-container {
        padding: 0;
    }

    .pd-image-container {
        min-height: 350px;
        max-height: 400px;
        border-radius: 16px;
    }

    .pd-image-track {
        padding: 30px;
    }

    .pd-main-img {
        max-width: 100%;
        max-height: 100%;
        filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    }

    .pd-info-panel {
        padding: 28px 20px 40px; /* Less padding now that actions are inline */
        gap: 16px;
    }

    .pd-title {
        font-size: 1.6rem;
    }

    .pd-price {
        font-size: 2.2rem;
    }

    .pd-trust-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .pd-action-area {
        display: grid !important; /* Override to show on mobile */
    }

    .pd-wa-note {
        display: none;
    }

    /* Sticky bar visible on mobile - shows on scroll */
    .pd-sticky-bar {
        display: flex;
    }

    .pd-breadcrumb .active {
        max-width: 120px;
    }

    .pd-related {
        padding: 40px 0;
    }
    
    .pd-wa-note {
        font-size: 0.75rem;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .pd-shimmer-img {
        height: 280px;
    }

    .pd-sticky-btn span {
        font-size: 0.8rem;
    }
}


/* Spark Plugs Brand Selection Buttons */
.brand-select-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: #F8F8FA;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 110px;
    gap: 8px;
}

.brand-select-btn:hover {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.08) 0%, rgba(0, 0, 51, 0.08) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.brand-select-btn .brand-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #d32f2f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.brand-select-btn:hover .brand-icon {
    background: linear-gradient(135deg, #d32f2f 0%, #000033 100%);
    color: white;
    transform: scale(1.1);
}

.brand-select-btn .brand-name {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .brand-select-btn {
        min-height: 100px;
        padding: 16px 12px;
    }
    
    .brand-select-btn .brand-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .brand-select-btn .brand-name {
        font-size: 0.8rem;
    }
}

/* ===========================
   GLOBAL IMAGE BORDER REMOVAL
   Remove all borders from product images across the site
   =========================== */
.pd-image-container,
.pd-image-container img,
.pd-thumbnail,
.pd-thumbnail img,
.product-card,
.product-card img,
.product-image-wrapper,
.product-image-wrapper img,
.related-product-card img,
.featured-img-wrap img,
.deal-card img,
.pd-image-slide,
.pd-image-slide img,
.detail-image-box,
.detail-image-box img,
.pd-image-wrapper,
.pd-image-wrapper img,
.pd-image-track,
.pd-image-track img,
.pd-image-panel,
.pd-image-panel img,
.pd-content,
.pd-content img,
.pd-container,
.pd-container img,
.pd-main,
.pd-main img,
.pd-main-img {
    border: 0 !important;
    border-width: 0 !important;
    outline: 0 !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    box-shadow: none !important;
}

/* ===========================
   SPARK PLUGS MAKE SELECTION MODAL - MOBILE OPTIMIZATION
   =========================== */
@media (max-width: 768px) {
    #sparkPlugsMakeModal .checkout-modal-content {
        max-width: 95%;
        width: 95%;
        max-height: 85vh;
    }
    
    #sparkPlugsMakeGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0;
    }
    
    .brand-select-btn {
        min-height: 90px !important;
        padding: 16px 12px !important;
        font-size: 0.85rem !important;
    }
    
    .brand-icon {
        font-size: 1.8rem !important;
        margin-bottom: 8px;
    }
    
    .brand-name {
        font-size: 0.85rem !important;
    }
    
    /* Ensure spark plugs button is visible on mobile */
    .pd-view-more-oils-box {
        display: block !important;
        margin: 20px 0 !important;
    }
    
    .pd-view-more-oils-btn {
        display: flex !important;
        padding: 14px 20px !important;
        font-size: 0.9rem !important;
    }
}

/* Brand Select Button Styling */
.brand-select-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: #111;
    transition: all 0.2s ease;
    min-height: 110px;
    cursor: pointer;
}

.brand-select-btn:hover {
    border-color: #d32f2f;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.05) 0%, rgba(0, 0, 51, 0.05) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
}

.brand-icon {
    font-size: 2rem;
    color: #d32f2f;
    margin-bottom: 10px;
}

.brand-name {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
