/* Fonts and Variables */
:root {
    --primary-color: #f97316; /* Premium Orange */
    --primary-hover: #ea580c;
    --secondary-color: #111827;
    --text-color: #374151;
    --text-light: #6b7280;
    --bg-body: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-family: 'Inter', sans-serif;
    --container-width: 1200px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-top {
    background-color: var(--secondary-color);
    color: #f3f4f6;
    font-size: 13px;
    padding: 8px 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
}

.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--secondary-color);
}

.search-bar {
    flex: 1;
    display: flex;
    max-width: 600px;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    outline: none;
    font-size: 15px;
}

.search-bar button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 24px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.search-bar button:hover {
    background-color: var(--primary-hover);
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--secondary-color);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
}

.action-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.action-item:hover {
    color: var(--primary-color);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--secondary-color);
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs span {
    margin: 0 8px;
}

/* Product Section */
.product-section {
    margin-bottom: 40px;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-image {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
}

.main-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s;
}

.main-image img:hover {
    transform: scale(1.05);
}

.thumbnails {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.thumbnails::-webkit-scrollbar {
    height: 6px;
}

.thumbnails::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
    flex-shrink: 0;
    opacity: 0.7;
    transition: all 0.2s;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail.active, .thumbnail:hover {
    border-color: var(--primary-color);
    opacity: 1;
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 14px;
}

.rating {
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 4px;
}

.reviews-count {
    color: var(--text-light);
    text-decoration: underline;
    cursor: pointer;
}

.stock-status {
    color: var(--success-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-price-box {
    background-color: var(--bg-body);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.price-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 4px;
}

.old-price {
    font-size: 18px;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-badge {
    background-color: var(--danger-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.current-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--secondary-color);
}

.product-features-list {
    margin-bottom: 30px;
}

.product-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 15px;
}

.product-features-list i {
    color: var(--success-color);
    font-size: 18px;
}

/* Action Area */
.action-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.qty-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.qty-label {
    font-weight: 500;
}

.qty-controls {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-body);
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e5e7eb;
}

.qty-input {
    width: 50px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    outline: none;
}

.buttons-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn {
    padding: 16px 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.btn-outline {
    background-color: white;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Delivery Info Cards */
.delivery-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.info-card {
    background: var(--bg-body);
    padding: 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--border-color);
}

.info-card i {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.info-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Details Section */
.details-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
    display: inline-block;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.feature-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-block img {
    border-radius: var(--radius-md);
    width: 100%;
    height: 300px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.feature-text h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.feature-text p {
    color: var(--text-light);
}

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.review-card {
    background: var(--bg-body);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.reviewer-name {
    font-weight: 600;
}

.review-date {
    font-size: 12px;
    color: var(--text-light);
}

.review-stars {
    color: #fbbf24;
    margin-bottom: 12px;
    font-size: 14px;
}

.review-text {
    font-size: 14px;
    font-style: italic;
    color: var(--text-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-white);
    width: 90%;
    max-width: 450px;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    background-color: var(--bg-body);
}

.form-control:focus {
    border-color: var(--primary-color);
    background-color: white;
}

.modal-product {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-body);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.modal-product img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.modal-product-info h5 {
    font-size: 14px;
    margin-bottom: 4px;
}

.modal-product-info p {
    font-weight: 700;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: #9ca3af;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-col p {
    margin-bottom: 16px;
    font-size: 14px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .product-layout, .features-grid {
        grid-template-columns: 1fr;
    }
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top .container {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
        font-size: 11px;
    }
    .header-main .container {
        flex-direction: column;
        padding: 10px 20px;
    }
    .product-layout {
        padding: 0;
        gap: 24px;
        background: transparent;
        box-shadow: none;
    }
    .product-gallery, .product-info {
        background: var(--bg-white);
        padding: 16px;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
    }
    .details-section {
        padding: 24px 16px;
    }
    .product-title {
        font-size: 20px;
    }
    .product-meta {
        flex-wrap: wrap;
        gap: 12px;
    }
    .current-price {
        font-size: 28px;
    }
    .price-top {
        flex-wrap: wrap;
    }
    .product-features-list li {
        font-size: 14px;
    }
    .delivery-info {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }
    .feature-block img {
        height: auto;
        aspect-ratio: 4/3;
    }
    .btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    .main-image {
        border-radius: var(--radius-sm);
    }
    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    .modal-content {
        padding: 24px 16px;
    }
}
