/* =========================
   PRODUCT DETAIL (ISOLATED)
========================= */

.pd-page {
    background: #f8f9fb;
}

/* CONTAINER */
.pd-container {
    display: flex;
    gap: 60px;
    padding: 60px;
    align-items: flex-start;
}

/* LEFT */
.pd-left {
    width: 45%;
}

/* 🔥 FIX: STICKY IMAGE */
.pd-image {
    position: sticky;
    top: 100px;
}

.pd-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: 0.4s;
}

.pd-image img:hover {
    transform: scale(1.05);
}

/* BADGE */
.pd-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.pd-badge.veg { background: green; }
.pd-badge.nonveg { background: red; }

/* RIGHT */
.pd-right {
    width: 55%;
}

/* 🔥 CARD STYLE */
.pd-right {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* TITLE */
.pd-title {
    font-size: 34px;
    font-weight: 700;
}

/* RATING */
.pd-rating {
    margin: 10px 0;
    color: #777;
}

/* PRICE */
.pd-price {
    font-size: 30px;
    color: #ff5722;
    font-weight: bold;
    margin: 15px 0;
}

/* DESC */
.pd-desc {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* QTY */
.pd-qty {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #f5f5f5;
    padding: 6px;
    border-radius: 10px;
    width: fit-content;
}

.pd-qty button {
    width: 40px;
    height: 40px;
    border: none;
    background: #eee;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
}

.pd-qty button:hover {
    background: #ff5722;
    color: #fff;
}

.pd-qty input {
    width: 60px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* ADD BUTTON */
.pd-add {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff5722, #ff3d00);
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.pd-add:hover {
    transform: scale(1.05);
}

/* =========================
   PRODUCT DETAILS SECTION
========================= */

.pd-details-section {
    padding: 40px 60px;
    margin-top: 30px;
    background: #fff;
    border-radius: 12px;
}

.pd-details-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* TABS */
.pd-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.pd-tab {
    padding: 10px 18px;
    border: none;
    border-radius: 20px;
    background: #eee;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.pd-tab.active {
    background: #ff5722;
    color: #fff;
}

/* CONTENT */
.pd-tab-content {
    display: none;
    background: #f8f9fb;
    padding: 20px;
    border-radius: 10px;
    min-height: 120px; /* 🔥 FIX EMPTY ISSUE */
    animation: fadeIn 0.3s ease;
}

.pd-tab-content.active {
    display: block;
}

/* LIST */
.pd-tab-content ul {
    list-style: none;
    padding: 0;
}

.pd-tab-content li {
    margin-bottom: 10px;
    font-size: 14px;
}

/* =========================
   RELATED
========================= */

.pd-related {
    padding: 40px 60px;
}

/* 🔥 FIX: PROPER CARD GRID */
.pd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.pd-card {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.pd-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    transition: 0.3s;
}

.pd-card:hover {
    transform: translateY(-5px);
}

.pd-card:hover img {
    transform: scale(1.05);
}

/* SLIDER */
.pd-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 40px;
}

.pd-slider::-webkit-scrollbar {
    display: none;
}

/* CARD */
.pd-slide-card {
    min-width: 200px;
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    flex-shrink: 0;
}

.pd-slide-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}

.pd-slide-card:hover {
    transform: translateY(-5px);
}

/* BUTTONS */
.pd-slide-btn {
    position: absolute;
    top: 40%;
    background: #fff;
    border: none;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.pd-slide-btn.left { left: 0; }
.pd-slide-btn.right { right: 0; }

.pd-slider-wrapper {
    position: relative;
}


/* DESCRIPTION */
.pd-desc-text{
    font-size:14px;
    line-height:1.6;
    color:#555;
}

/* SPEC LIST */
.pd-spec-list{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.pd-spec-item{
    display:flex;
    gap:12px;
    align-items:center;
    background:#fff;
    padding:10px 12px;
    border-radius:10px;
    box-shadow:0 5px 15px rgba(0,0,0,0.05);
    transition:0.3s;
}

.pd-spec-item:hover{
    transform:translateX(5px);
}

.pd-spec-item span{
    font-size:18px;
}

.pd-spec-item p{
    margin:0;
    font-size:14px;
}

/* =========================
   ANIMATION
========================= */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:768px){

    .pd-container {
        flex-direction: column;
        padding: 20px;
    }

    .pd-left,
    .pd-right {
        width: 100%;
    }

    .pd-title {
        font-size: 24px;
    }

    .pd-details-section,
    .pd-related {
        padding: 20px;
    }
}