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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #000000;
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
}

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

.currency-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-select {
    padding: 8px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.currency-select:focus {
    border-color: #000000;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-btn:hover {
    color: #000000;
}

/* Main Content */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 80px);
}

.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 18px;
    color: #666666;
    font-weight: 400;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #e5e5e5;
}

.product-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: #f8f8f8;
}

.product-content {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-desc {
    font-size: 14px;
    color: #666666;
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
}

.old-price {
    font-size: 14px;
    color: #999999;
    text-decoration: line-through;
}

.discount-badge {
    background: #ff4444;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.btn-order {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-order:hover {
    background: #333333;
    transform: translateY(-1px);
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.product-images {
    position: sticky;
    top: 100px;
}

.main-image-container {
    position: relative;
    margin-bottom: 16px;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    background: #f8f8f8;
}

.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
}

.main-image-container:hover .image-nav {
    opacity: 1;
}

.image-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

.image-nav-prev {
    left: 16px;
}

.image-nav-next {
    right: 16px;
}

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

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.thumbnail:hover {
    border-color: #cccccc;
}

.thumbnail.active {
    border-color: #000000;
}

.product-info {
    padding-top: 20px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 16px;
    line-height: 1.3;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 16px;
}

.description-content {
    color: #666666;
    line-height: 1.7;
    margin-bottom: 32px;
}

.description-content h3 {
    color: #000000;
    font-weight: 600;
    margin: 16px 0 8px 0;
}

.description-content ul {
    margin-left: 20px;
}

.description-content li {
    margin-bottom: 4px;
}

.order-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 32px;
}

.delivery-info {
    text-align: center;
    color: #666666;
    font-size: 14px;
    margin-top: 12px;
}

/* Buttons */
.btn-primary {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background: #333333;
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 18px 24px;
    font-size: 18px;
}

/* Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

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

.popup-content {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0 24px;
    margin-bottom: 24px;
}

.popup-title {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
}

.popup-close {
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.popup-close:hover {
    color: #000000;
}

/* Forms */
.order-form {
    padding: 0 24px 24px 24px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 6px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    background: #ffffff;
    transition: border-color 0.2s ease;
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: #000000;
}

.phone-input {
    display: flex;
    gap: 8px;
}

.phone-code {
    width: 100px;
    padding: 12px 8px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    background: #ffffff;
    outline: none;
}

.phone-number {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    background: #ffffff;
    outline: none;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-option:hover {
    border-color: #cccccc;
    background: #f8f8f8;
}

.payment-option input[type="radio"] {
    margin: 0;
}

.payment-text {
    font-size: 14px;
    color: #333333;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-images {
        position: static;
    }

    .main-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header-content {
        height: 60px;
    }

    .logo-text {
        font-size: 20px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .main {
        padding: 24px 0;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .product-content {
        padding: 16px;
    }

    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-order {
        width: 100%;
        justify-content: center;
    }

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

    .main-image {
        height: 250px;
    }

    .popup-content {
        margin: 0;
        border-radius: 12px;
    }

    .phone-input {
        flex-direction: column;
    }

    .phone-code {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-image {
        height: 200px;
    }

    .main-image {
        height: 200px;
    }

    .popup-overlay {
        padding: 12px;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}