/* ==========================================================================
   Product Detail Page Stylesheet - Andhra Pradesh Frontend
   ========================================================================== */

/* Allow app-wrapper to expand to natural height so common footer stays at the very bottom */
.app-wrapper {
    height: auto !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.pdetail-page-wrapper {
    flex: 1 0 auto;
    width: 100%;
    background-color: #f8fafc;
    padding-bottom: 30px;
}


/* 1. Header Bar */
.pdetail-top-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.pdetail-back-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pdetail-back-btn:hover {
    background: #064e3b;
    color: #ffffff;
}

.pdetail-bar-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    text-align: center;
    flex-grow: 1;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdetail-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdetail-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    font-size: 17px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pdetail-icon-btn:hover {
    background: #e2e8f0;
    color: #064e3b;
}

.pdetail-icon-btn.active {
    color: #ef4444;
}

.pdetail-cart-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background-color: #064e3b;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #ffffff;
}

/* 2. Breadcrumbs */
.pdetail-breadcrumb-wrap {
    padding: 10px 16px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.pdetail-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
}

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

.pdetail-breadcrumb a:hover {
    color: #064e3b;
}

.pdetail-breadcrumb .sep {
    color: #cbd5e1;
    font-size: 11px;
}

.pdetail-breadcrumb .current {
    color: #0f172a;
    font-weight: 600;
}

/* 3. Main Product Section */
.pdetail-content-container {
    padding: 16px;
}

.pdetail-main-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 24px;
}

/* Image Preview */
.pdetail-gallery-box {
    padding: 16px;
    background: linear-gradient(180deg, #fbfcfe 0%, #f1f5f9 100%);
    position: relative;
    border-bottom: 1px solid #f1f5f9;
}

.pdetail-gi-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #064e3b;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 3px 10px rgba(6, 78, 59, 0.25);
    z-index: 2;
}

.pdetail-gi-badge i {
    color: #fbbf24;
    font-size: 12px;
}

.pdetail-hero-img-wrap {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    background: #ffffff;
    padding: 10px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
    .pdetail-hero-img-wrap {
        height: 380px;
    }
}

.pdetail-hero-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.pdetail-hero-img-wrap:hover .pdetail-hero-img {
    transform: scale(1.04);
}

/* Thumbnail Strip */
.pdetail-thumbnails-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.pdetail-thumb-item {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    padding: 4px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pdetail-thumb-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pdetail-thumb-item.active,
.pdetail-thumb-item:hover {
    border-color: #064e3b;
    box-shadow: 0 0 0 2px rgba(6, 78, 59, 0.2);
    transform: translateY(-2px);
}

/* 4. Product Info & Pricing */
.pdetail-info-box {
    padding: 20px 18px;
}

.pdetail-origin-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #b45309;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.pdetail-title {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 12px;
}

@media (min-width: 576px) {
    .pdetail-title {
        font-size: 22px;
    }
}

.pdetail-rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pdetail-star-pill {
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #a7f3d0;
}

.pdetail-rating-count {
    font-size: 12px;
    color: #64748b;
}

.pdetail-stock-status {
    font-size: 12px;
    font-weight: 600;
    color: #15803d;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* Price Box */
.pdetail-price-card {
    background: #fdfbf7;
    border: 1px solid #fef3c7;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.pdetail-price-main-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.pdetail-curr-price {
    font-size: 28px;
    font-weight: 900;
    color: #064e3b;
    line-height: 1;
}

.pdetail-mrp-price {
    font-size: 16px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.pdetail-discount-pill {
    background: #fee2e2;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.pdetail-tax-note {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

/* 5. Quantity Selector & Add to Cart Controls */
.pdetail-action-control-panel {
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    padding-top: 18px;
    margin-bottom: 22px;
}

.pdetail-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.pdetail-qty-label {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdetail-qty-counter {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 50px;
    padding: 3px 6px;
}

.pdetail-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pdetail-qty-btn:hover:not(:disabled) {
    background: #064e3b;
    color: #ffffff;
    border-color: #064e3b;
}

.pdetail-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pdetail-qty-input {
    width: 44px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    outline: none;
}

/* Action Buttons */
.pdetail-buttons-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 480px) {
    .pdetail-buttons-row {
        grid-template-columns: 1fr 1fr;
    }
}

.pdetail-add-cart-btn {
    background: #064e3b;
    color: #ffffff;
    border: none;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(6, 78, 59, 0.25);
    transition: all 0.2s ease;
    width: 100%;
}

.pdetail-add-cart-btn:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(6, 78, 59, 0.32);
}

.pdetail-buy-now-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25);
    transition: all 0.2s ease;
    width: 100%;
}

.pdetail-buy-now-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.35);
}

/* 6. Product Description Section (Only description, clean & focused) */
.pdetail-desc-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #edf2f7;
    padding: 20px 18px;
    margin-bottom: 24px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.03);
}

.pdetail-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.pdetail-section-header i {
    color: #064e3b;
    font-size: 18px;
}

.pdetail-section-header h2 {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.pdetail-desc-text {
    font-size: 13.5px;
    color: #334155;
    line-height: 1.65;
    margin-bottom: 18px;
}

/* Key Highlights List / Specs */
.pdetail-specs-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

@media (min-width: 576px) {
    .pdetail-specs-list {
        grid-template-columns: 1fr 1fr;
    }
}

.pdetail-spec-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
}

.pdetail-spec-title {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.pdetail-spec-value {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

/* Authentic Perks Strip */
.pdetail-perks-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}

.pdetail-perk-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.pdetail-perk-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #047857;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.pdetail-perk-text {
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

/* 7. Related Products Section */
.pdetail-related-section {
    margin-top: 28px;
}

.pdetail-related-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 14px;
}

.pdetail-related-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdetail-related-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 0 0;
}

.pdetail-view-all-link {
    font-size: 12px;
    font-weight: 700;
    color: #064e3b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pdetail-view-all-link:hover {
    text-decoration: underline;
}

/* Grid of Related Products */
.pdetail-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 576px) {
    .pdetail-related-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

.pdetail-rel-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #edf2f7;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    padding: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.25s ease;
}

.pdetail-rel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.pdetail-rel-img-wrap {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 8px;
    background-color: #fafafa;
}

.pdetail-rel-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.pdetail-rel-card:hover .pdetail-rel-img {
    transform: scale(1.05);
}

.pdetail-rel-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    margin-bottom: 6px;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pdetail-rel-price {
    font-size: 14px;
    font-weight: 800;
    color: #064e3b;
    margin-top: auto;
}

/* 8. Floating Toast Notification */
.pdetail-toast {
    position: fixed;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    max-width: 90%;
}

.pdetail-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.pdetail-toast i {
    color: #4ade80;
    font-size: 18px;
}
