/* E-commerce extra styles (sidebar and consistent product sizes) */
.product-hero {
    margin-bottom: 30px;
}

.product-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 28px 30px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
    flex-wrap: wrap;
}

.product-hero-card h1 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 12px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(23, 153, 33, 0.1);
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.product-hero-card p {
    color: #475569;
    max-width: 760px;
    line-height: 1.8;
    margin: 0;
}

.product-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 14px;
    align-items: start;
}

@media (min-width: 1600px) {
    .product-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    min-height: auto;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    position: relative;
    will-change: transform;
    transform: scale(0.92);
    transform-origin: top center;
    width: 108.7%;
    margin: 0 auto 6px;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
    z-index: 2;
}

.product-card-top {
    position: relative;
}

.product-image {
    min-height: 152px;
    height: 152px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #f8fafc;
}

.product-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--secondary);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.product-card-body {
    flex: none;
    padding: 6px 6px 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-card-header h3 {
    margin: 0 0 4px;
}

.product-card p {
    flex: none !important;
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.2;
    min-height: 18px;
    color: #475569;
}

.product-code {
    display: none;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 2px;
}

.hero-feature-list li {
    margin-bottom: 10px;
    line-height: 1.7;
    max-width: 520px;
}

.product-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.product-card-body h3 {
    font-size: 0.90rem;
    margin: 0;
    line-height: 1.15;
    color: var(--dark);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-brand-code-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    overflow: hidden;
    align-items: center;
}

.product-brand-code-row span,
.product-brand-code-row .product-review {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #475569;
}

.product-brand-code-row .product-review {
    margin-left: 0;
}

.product-brand-code-row .product-review {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f59e0b;
    font-weight: 700;
}

.product-brand-code-row .product-review i {
    font-size: 0.85rem;
}

.product-meta-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #64748b;
    overflow: hidden;
}

.product-meta-row span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #f59e0b;
    font-size: 0.95rem;
    font-weight: 700;
}

.product-rating i {
    font-size: 1rem;
}

.product-rating span {
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-description {
    color: #475569;
    font-size: 0.72rem;
    line-height: 1.15;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2px;
    margin-top: 0;
    flex-wrap: nowrap;
}

.product-pricing .price {
    font-size: 0.70rem;
    font-weight: 800;
    color: #164162;
    line-height: 1.0;
}

.product-pricing .mrp {
    color: #64748b;
    text-decoration: line-through;
    font-size: 0.58rem;
    margin-left: 4px;
    line-height: 1.0;
}

.product-detail-page {
    min-height: calc(100vh - 180px);
    padding: 16px 0 20px;
    background: #f8fafc;
}

.product-detail-page .container {
    height: 100%;
    display: flex;
    align-items: stretch;
    max-width: none;
    width: 100%;
    padding: 0 15px;
}

.product-detail-panel {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 34px;
    align-items: stretch;
    min-height: 100%;
}

.product-detail-left,
.product-detail-right {
    width: 100%;
}

.product-detail-left,
.product-detail-right {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.product-detail-image {
    min-height: 380px;
    transition: background-size 0.2s ease, background-position 0.1s ease;
    background-repeat: no-repeat;
    background-position: center center;
    cursor: zoom-in;
    overflow: hidden;
}

.product-detail-image.zoom-active {
    cursor: zoom-out;
}

@media (max-width: 992px) {
    .product-detail-page {
        min-height: auto;
        padding: 20px 0;
    }

    .product-detail-panel {
        grid-template-columns: 1fr;
    }
}


.product-savings {
    color: #16a34a;
    font-size: 0.95rem;
    font-weight: 700;
}

.product-card-footer {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    padding: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    z-index: 3;
}

.product-card:hover .product-card-footer {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.product-card {
    cursor: pointer;
}

.product-card-footer .btn {
    flex: 0 0 36px;
    width: 36px;
    min-height: 36px;
    padding: 0;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-top: 0;
    border-radius: 999px;
}

.product-card-footer .view-details,
.product-card-footer .add-cart {
    min-height: 38px;
    margin-top: 0;
}

.product-rating span {
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-description {
    color: #475569;
    font-size: 0.72rem;
    line-height: 1.15;
    min-height: auto;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    margin-top: 0;
    line-height: 1;
}

.product-pricing .price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #164162;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.product-pricing .mrp {
    color: #64748b;
    text-decoration: line-through;
    font-size: 0.75rem;
    margin-left: 4px;
    line-height: 1;
    margin-top: 0;
    padding: 0;
}

.product-savings {
    color: #16a34a;
    font-size: 0.95rem;
    font-weight: 700;
}

.product-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.95rem;
    color: #64748b;
}

.product-card-footer .btn-secondary {
    background: #effaf1;
    color: var(--secondary);
    border: 1px solid rgba(23, 153, 33, 0.25);
}

.product-card-footer .btn-secondary:hover {
    background: #d8eddb;
}

.product-detail-left .detail-image-meta {
    margin-top: 16px;
}

.product-detail-left .detail-image-meta h4 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: var(--secondary);
}

.product-detail-left .detail-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.product-detail-left .detail-meta-grid div {
    padding: 10px 12px;
}

.product-detail-left .detail-meta-grid strong {
    display: block;
    margin-bottom: 4px;
    color: var(--secondary);
    font-size: 0.88rem;
}

.product-detail-left .detail-meta-grid span {
    color: #334155;
    font-size: 0.95rem;
}

.product-empty-message {
    padding: 60px 24px;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    border-radius: 20px;
    background: #f8fafc;
    color: #334155;
}

.product-empty-message h3 {
    margin: 0 0 10px;
    font-size: 1.6rem;
}

.product-empty-message p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

/* Cart panel (hidden until items added) */
.cart-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: min(380px, 100%);
    max-width: 380px;
    background: white;
    border-left: 1px solid #e5e7eb;
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.12);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    z-index: 1002;
}

.cart-panel.visible {
    transform: translateX(0);
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 1000;
}

.cart-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.cart-panel.hidden {
    display: none;
}

.cart-panel .cart-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: #334155;
    font-size: 1rem;
}

/* Generic hidden utility */
.hidden { display: none !important; }

.cart-header { display:flex; justify-content:space-between; align-items:center; }
.cart-items { display:flex; flex-direction:column; gap:10px; max-height:420px; overflow:auto; }
.cart-item { display:flex; gap:10px; align-items:center; }
.cart-item-thumb {
    width: 64px;
    height: 56px;
    border-radius: 8px;
    background-color: #f8fafc;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    overflow: hidden;
    border: 1px solid #edf2f7;
    flex-shrink: 0;
}
.cart-item-details h4 { margin:0; font-size:0.95rem; }
.cart-summary .summary-row { display:flex; justify-content:space-between; padding:6px 0; }
.cart-summary .total-row { font-weight:700; border-top:1px dashed #eef2f6; padding-top:10px; }
.cart-open-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    padding: 2px 8px;
}

.cart-open-link i {
    font-size: 1rem;
}

/* Product detail page styling */
#products.section-padding {
    padding-top: 0;
    padding-bottom: 60px;
}
.product-detail-page {
    background: #f8fafc;
    padding: 10px 0 50px;
}
.product-detail-page > .container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
}
.product-detail-toolbar {
    margin: 0;
    padding: 0 0 8px;
}
.product-detail-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    padding: 10px 16px;
}
.product-detail-fullscreen {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 28px;
}
.product-detail-left,
.product-detail-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.product-detail-left {
    position: sticky;
    top: 24px;
    align-self: start;
    max-width: none;
    width: 100%;
}
.product-detail-right {
    position: static;
}
.product-detail-fullscreen .product-detail-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 560px;
    max-height: 820px;
    margin: 0;
    background-color: #f8fafc;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
}
.product-detail-thumbnails {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.product-detail-thumbnails .thumbnail {
    width: 88px;
    height: 88px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    cursor: pointer;
}
.product-detail-thumbnails .thumbnail.active {
    border-color: #179921;
}
.detail-header-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.detail-badge {
    background: #e6f7ed;
    color: #107242;
    border: 1px solid #d1f4d8;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 700;
}
.detail-availability {
    color: #047857;
    font-weight: 700;
}
.detail-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.detail-subtitle {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    color: #64748b;
    font-size: 0.95rem;
}
.detail-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 18px;
    margin: 16px 0 10px;
}
.detail-price {
    font-size: 3.8rem;
    font-weight: 900;
    color: #164162;
}
.detail-mrp {
    font-size: 1.05rem;
    color: #64748b;
    text-decoration: line-through;
}
.detail-discount {
    color: #16a34a;
    font-weight: 800;
    font-size: 1rem;
}
.detail-seller-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    color: #475569;
    font-size: 0.96rem;
}
.detail-offers {
    padding: 22px 24px;
    background: #f8fafc;
    border-radius: 22px;
    border: 1px solid #e5e7eb;
}
.detail-offers h4 {
    margin-bottom: 14px;
    font-size: 1rem;
    color: #164162;
}
.detail-offers ul {
    list-style: disc inside;
    margin: 0;
    padding: 0;
    color: #475569;
}
.detail-offers li {
    margin-bottom: 12px;
    line-height: 1.75;
}
.detail-description-wrapper {
    padding: 24px;
    background: #f8fafc;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
}
.detail-description-wrapper h4 {
    margin: 0 0 14px;
    font-size: 1.05rem;
    color: #164162;
}
.detail-description {
    margin: 0;
    color: #334155;
    font-size: 1rem;
    line-height: 1.75;
    white-space: pre-line;
}
.detail-actions-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 16px;
}

.detail-quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

.detail-quantity .qty-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: #f8fafc;
    color: #164162;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.detail-quantity .qty-btn:hover {
    background: #e2e8f0;
}

.detail-quantity .qty-value {
    min-width: 42px;
    padding: 0 12px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
}

.detail-actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 0;
}
.detail-actions .btn {
    width: clamp(140px, 28%, 220px);
    height: 48px;
    min-height: 48px;
    font-size: 0.95rem;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
}
.detail-actions .btn.btn-primary,
.detail-actions .btn.btn-secondary {
    max-width: 220px;
    margin-top: 0;
}
.detail-specs {
    padding: 24px;
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid #e5e7eb;
}
.detail-specs h4 {
    margin-bottom: 16px;
    color: #164162;
}
.detail-meta-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}
.detail-meta-grid div {
    display: grid;
    gap: 6px;
}
.detail-meta-grid strong {
    color: #475569;
    font-size: 0.95rem;
}
.detail-meta-grid span {
    color: #334155;
    font-size: 0.95rem;
}
.product-detail-page.hidden {
    display: none !important;
}
@media (max-width: 1100px) {
    .product-detail-fullscreen {
        grid-template-columns: 1fr;
        padding: 34px;
    }
    .product-detail-left,
    .product-detail-right {
        position: static;
    }
}
@media (max-width: 768px) {
    .product-detail-toolbar,
    .product-detail-fullscreen {
        padding: 0 16px;
    }
    .product-detail-fullscreen {
        gap: 24px;
    }
    .detail-prices {
        flex-direction: column;
        align-items: flex-start;
    }
    .detail-price {
        font-size: 2.8rem;
    }
}
@media (max-width: 1100px) {
    .product-detail-panel {
        grid-template-columns: 1fr;
    }
    .product-detail-right {
        position: relative;
        top: auto;
    }
}
.product-detail-thumbnails .thumbnail {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    cursor: pointer;
}
.product-detail-thumbnails .thumbnail.active {
    border-color: var(--secondary);
}
.detail-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.detail-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(23, 153, 33, 0.1);
    color: var(--secondary);
    font-weight: 700;
    letter-spacing: 0.02em;
}
.detail-availability {
    color: #0f766e;
    font-weight: 600;
}
.detail-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.detail-subtitle {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 6px;
    color: #475569;
    font-size: 0.95rem;
}
.detail-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 18px;
    margin: 12px 0 6px;
}
.detail-price {
    font-size: 3rem;
    font-weight: 900;
    color: var(--dark);
}
.detail-mrp {
    font-size: 1rem;
    color: #64748b;
    text-decoration: line-through;
}
.detail-discount {
    color: #16a34a;
    font-weight: 700;
}
.detail-seller-row {
    display: grid;
    gap: 10px;
    color: #475569;
    font-size: 0.95rem;
}
.detail-seller-row strong {
    color: #334155;
}
.detail-offers {
    padding: 20px 24px;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
}
.detail-offers h4 {
    margin-bottom: 12px;
    font-size: 1rem;
}
.detail-offers ul {
    list-style: disc inside;
    margin: 0;
    padding: 0;
    color: #475569;
}
.detail-offers li {
    margin-bottom: 10px;
    line-height: 1.7;
}
.detail-description {
    color: #334155;
    font-size: 1rem;
    line-height: 1.8;
}
.detail-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.detail-actions .btn {
    flex: 1 1 220px;
}
.detail-specs {
    padding: 22px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
}
.detail-specs h4 {
    margin-bottom: 12px;
}
.detail-specs pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Roboto', sans-serif;
    color: #475569;
    margin: 0;
}
.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}
.detail-meta-grid div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}
.detail-meta-grid strong {
    color: #334155;
    font-size: 0.9rem;
}
.detail-meta-grid span {
    color: #64748b;
    font-size: 0.9rem;
}

/* Compact product detail adjustments */
.product-detail-fullscreen {
    gap: 18px;
    padding: 22px;
}
.product-detail-left {
    max-width: none;
}
.product-detail-image {
    min-height: 420px;
    max-height: 640px;
    border-radius: 0;
}
.product-detail-thumbnails .thumbnail {
    width: 72px;
    height: 72px;
    border-radius: 14px;
}
.detail-header-row {
    gap: 12px;
}
.detail-badge {
    padding: 8px 14px;
    font-size: 0.9rem;
}
.detail-availability {
    font-size: 0.95rem;
}
.detail-category {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}
.detail-subtitle {
    gap: 6px;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.9rem;
}
.detail-prices {
    gap: 14px;
    margin: 12px 0 8px;
}
.detail-price {
    font-size: 3rem;
}
.detail-mrp {
    font-size: 0.95rem;
}
.detail-discount {
    font-size: 0.95rem;
}
.detail-seller-row {
    gap: 10px;
    font-size: 0.9rem;
}
.detail-offers {
    padding: 18px;
    border-radius: 18px;
}
.detail-offers h4 {
    font-size: 0.98rem;
}
.detail-description-wrapper {
    padding: 18px;
    border-radius: 18px;
}
.detail-description {
    font-size: 0.95rem;
    line-height: 1.7;
}
.detail-actions {
    gap: 12px;
}
.detail-actions .btn {
    height: 48px;
    min-height: 48px;
}
.detail-specs {
    padding: 18px;
    border-radius: 18px;
}
.detail-specs h4 {
    margin-bottom: 12px;
    font-size: 1rem;
}
.detail-meta-grid {
    gap: 12px;
}
.detail-meta-grid div {
    padding: 14px 16px;
}
@media (max-width: 1160px) {
    .product-detail-panel {
        grid-template-columns: 1fr;
        padding: 40px 30px 30px;
    }
}
@media (max-width: 800px) {
    .product-detail-modal .modal-close {
        top: 18px;
        right: 18px;
    }
    .product-detail-panel {
        padding: 28px 20px 20px;
    }
    .detail-actions {
        flex-direction: column;
    }
}
@media (max-width: 560px) {
    .detail-price {
        font-size: 2.4rem;
    }
    .product-detail-thumbnails .thumbnail {
        width: 68px;
        height: 68px;
    }
}

.cart-open-link span {
    display: inline-flex;
    min-width: 22px;
    justify-content: center;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(22, 65, 98, 0.1);
    color: var(--primary);
    font-size: 0.85rem;
}

.login-dropdown {
    position: relative;
}

.login-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(22, 65, 98, 0.15);
    background: white;
}

.login-simple,
.login-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--primary);
    text-decoration: none;
    padding: 6px 10px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.login-simple {
    padding-right: 8px;
}

.login-toggle {
    width: 30px;
    padding: 6px 8px;
}

.login-trigger:hover {
    background: rgba(22, 65, 98, 0.07);
}

.login-simple:hover,
.login-toggle:hover {
    background: transparent;
}

.login-link i:last-child {
    font-size: 0.8rem;
}

.login-dropdown:hover .login-menu,
.login-menu.visible {
    display: block;
}

.login-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 220px;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    padding: 10px 0;
    z-index: 1001;
    display: none;
}

.login-menu::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 20px;
    width: 14px;
    height: 14px;
    background: white;
    transform: rotate(45deg);
    border-left: 1px solid rgba(226, 232, 240, 0.95);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.login-menu-title {
    font-size: 0.9rem;
    color: #4b5563;
    padding: 12px 16px 8px;
    margin: 0;
}

.login-signup {
    color: var(--primary);
    font-weight: 700;
}

.login-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #334155;
    text-decoration: none;
    padding: 10px 16px;
    transition: background 0.2s ease;
}

.login-menu-item:hover {
    background: rgba(22, 65, 98, 0.06);
}

.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 1000;
}

.login-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 1000;
}

.auth-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.login-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(420px, calc(100% - 40px));
    max-width: 420px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.16);
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease;
    z-index: 1002;
    padding: 24px;
}

.login-modal.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.login-modal.hidden {
    display: none;
}

.product-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 1000;
}

.product-detail-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.product-detail-modal {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(980px, calc(100% - 40px));
    max-height: calc(100vh - 60px);
    background: white;
    border-radius: 24px;
    box-shadow: 0 35px 90px rgba(15, 23, 42, 0.22);
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease;
    z-index: 1002;
    padding: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
}

.product-detail-modal.visible {
    opacity: 1;
    transform: scale(1);
}

.product-detail-modal.hidden {
    display: none;
}

.product-detail-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    width: 100%;
    min-height: 100%;
}

.product-detail-modal .product-detail-image {
    position: relative;
    min-height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-modal .product-detail-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.3));
}

.product-detail-modal .product-detail-info {
    padding: 34px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
}

.detail-category,
.detail-code,
.detail-stock {
    color: #475569;
    font-size: 0.95rem;
}

.detail-prices {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.detail-mrp {
    font-size: 1rem;
    color: #64748b;
    text-decoration: line-through;
}

.detail-description {
    color: #334155;
    line-height: 1.75;
    white-space: pre-line;
}

.detail-specs h4 {
    margin-bottom: 10px;
}

.detail-specs pre {
    white-space: pre-wrap;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    color: #334155;
    font-size: 0.95rem;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-meta-grid div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: #f8fafc;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.detail-category,
.detail-code,
.detail-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #475569;
}

.detail-category {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.detail-code,
.detail-stock {
    color: #64748b;
}

.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.detail-actions .btn {
    flex: 1 1 160px;
    min-width: 160px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .product-detail-modal {
        grid-template-columns: 1fr;
        max-height: 95vh;
    }

    .product-detail-body {
        grid-template-columns: 1fr;
    }

    .product-detail-info {
        padding: 24px;
    }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: white;
    color: #334155;
    font-size: 1.1rem;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
}

.auth-tab {
    flex: 1;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    font-weight: 700;
}

.auth-tab.active {
    background: var(--primary);
    color: white;
    border-color: transparent;
}

.auth-view h3 {
    margin-bottom: 18px;
    font-size: 1.25rem;
}

.auth-view label {
    display: block;
    margin-bottom: 6px;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
}

.auth-view input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.auth-view form {
    display: flex;
    flex-direction: column;
}

.auth-view p {
    margin-bottom: 20px;
    color: #475569;
}

.profile-action {
    margin-top: 20px;
}

.btn-block { width:100%; display:inline-block; }

.btn-block { width:100%; display:inline-block; }
