/* ==========================
   BASE
========================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f1f5f9;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* ==========================
   REVEAL ANIMATIONS
========================== */

.reveal-left {
    opacity: 0;
    transform: translateX(-28px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal-right {
    opacity: 0;
    transform: translateX(28px);
    transition: opacity .6s ease, transform .6s ease .1s;
}

.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-left, .reveal-right {
        opacity: 1; transform: none; transition: none;
    }
}

/* ==========================
   WRAPPER + BREADCRUMB
========================== */

.pd-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 18px 60px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.breadcrumb a {
    text-decoration: none;
    color: #64748b;
    transition: color .2s;
}

.breadcrumb a:hover { color: #2563eb; }

.breadcrumb span:not(:last-child):not(:first-child) {
    color: #cbd5e1;
}

.breadcrumb span:last-child {
    color: #0f172a;
    font-weight: 600;
}

/* ==========================
   LAYOUT GRID
========================== */

.pd-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* ==========================
   GALLERY
========================== */

.pd-gallery {
    position: sticky;
    top: 20px;
}

.main-image{

    position:relative;

    background:#fff;

    border-radius:18px;

    overflow:hidden;

    border:1px solid #e2e8f0;

}

.slider-wrapper{

    overflow:hidden;

}

.slider-track{

    display:flex;

    transition:transform .4s ease;
    width:100%;

}

.slider-track img{

    width:100%;

    min-width:100%;

    flex-shrink:0;

    height:450px;

    object-fit:contain;

    background:#fff;

    padding:20px;

    display:block;

}

.slider-btn{

    position:absolute;

    top:50%;

    transform:translateY(-50%);

    width:45px;

    height:45px;

    border:none;

    border-radius:50%;

    background:#fff;
    transition:.3s;

    color:#0f172a;

    box-shadow:0 4px 15px rgba(0,0,0,.12);

    cursor:pointer;

    z-index:10;

    font-size:22px;


}

.slider-btn:hover{

    background:#2563eb;

    color:#fff;

}

.prev{

    left:15px;

}

.next{

    right:15px;

}

.slider-dots{

    display:flex;

    justify-content:center;

    gap:10px;

    margin-top:18px;

}

.slider-dots span{

    width:11px;

    height:11px;

    border-radius:50%;

    background:#cbd5e1;

    cursor:pointer;

    transition:.3s;

}

.slider-dots span.active{

    background:#2563eb;

    transform:scale(1.2);

}

/* ==========================
   INFO PANEL
========================== */

.pd-info {
    background: white;
    border-radius: 18px;
    padding: 32px 30px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Category tag */
.category-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    padding: 5px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .5px;
    align-self: flex-start;
}

/* Title */
.product-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    letter-spacing: -.3px;
}

/* Rating */
.rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 20px;
    color: #d1d5db;
}

.star.filled { color: #f59e0b; }
.star.half   { color: #f59e0b; opacity: .5; }

.rating-text {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

/* Price */
.price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.price {
    font-size: 38px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -1px;
}

.price-note {
    font-size: 12px;
    color: #94a3b8;
}

/* Stock */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 10px;
    align-self: flex-start;
}

.in-stock  { background: #dcfce7; color: #16a34a; }
.out-stock { background: #fee2e2; color: #dc2626; }

/* Divider */
.divider {
    height: 1px;
    background: #f1f5f9;
    border-radius: 999px;
}

/* Description */
.desc-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.description {
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
}

/* Highlights */
.highlights {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    font-weight: 600;
}

/* Quantity */
.qty-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.qty-label {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.qty-control button {
    width: 38px;
    height: 38px;
    background: #f8fafc;
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: #334155;
    transition: .2s;
}

.qty-control button:hover { background: #eff6ff; color: #2563eb; }

.qty-control span {
    width: 44px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    border-left: 1.5px solid #e2e8f0;
    border-right: 1.5px solid #e2e8f0;
    height: 38px;
    line-height: 38px;
}

/* Buttons */
.buttons {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.cart-btn,
.buy-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    transition: .25s;
    cursor: pointer;
    border: none;
}

.cart-btn {
    background: #f8fafc;
    color: #0f172a;
    border: 2px solid #e2e8f0;
}

.cart-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37,99,235,.12);
}

.buy-btn {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 16px rgba(37,99,235,.3);
}

.buy-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37,99,235,.4);
}

.cart-btn.disabled {
    background: #f1f5f9;
    color: #94a3b8;
    border: 2px solid #e2e8f0;
    cursor: not-allowed;
    pointer-events: none;
    flex: 1;
}

.cart-btn.in-cart {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.cart-btn.in-cart:hover {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 6px 18px rgba(37,99,235,.25);
}

.cart-btn.need-update {
    background: #eff6ff;
    border: 2px solid #2563eb;
    color: #2563eb;
}

.cart-btn.need-update:hover {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(37,99,235,.25);
}

/* ==========================
   MOBILE
========================== */

@media (max-width: 768px) {

    .pd-wrapper {
        padding: 22px 16px 70px;
    }

    .breadcrumb {
        margin-top: 4px;
        margin-bottom: 16px;
    }

    .pd-container{
        grid-template-columns:1fr;
        gap:0;
        padding:0;
    }

    .pd-gallery{
        position:static;
        background:transparent;
        border:none;
        box-shadow:none;
        padding:0;
    }

    .slider-track img{

        height:300px;

        object-fit:contain;

        padding:15px;

    }

    /* Hide slider navigation arrows on phone view */
    .slider-btn{
        display: none !important;
    }

    .pd-info{
        background:transparent;
        border:none;
        box-shadow:none;
        border-radius:0;
        padding:20px 15px;
        gap:14px;
    }

    .product-title {
        font-size: 20px;
    }

    .price {
        font-size: 30px;
    }

    .cart-btn, .buy-btn {
        font-size: 14px;
        padding: 13px;
    }

    .reveal-left, .reveal-right {
        transform: translateY(16px);
        transition: opacity .5s ease, transform .5s ease;
    }

    .reveal-left.revealed, .reveal-right.revealed {
        transform: translateY(0);
    }

    .buttons{
        display:flex;
        gap:10px;
    }

    .buttons a{
        flex:1;
    }


    
}

