/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
    background: #f8f9fa;
    line-height: 1.6;
}

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

/* Header Styles */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 24px;
    color: #2c3e50;
}

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

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #667eea;
}

.btn-register {
    background: #667eea;
    color: white !important;
    padding: 8px 20px;
    border-radius: 5px;
}

.btn-register:hover {
    background: #5568d3;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
}

.search-box form {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

/* Products Section */
.products-section {
    padding: 40px 0;
}

.products-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    margin-bottom: 30px;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #2c3e50;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #2c3e50;
    border-radius: 5px;
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: #f0f1ff;
    color: #667eea;
    padding-left: 15px;
}

.category-list .count {
    float: right;
    color: #95a5a6;
    font-size: 14px;
}

/* Products Grid */
.products-container {
    min-height: 400px;
}

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

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.badge-warning {
    background: #f39c12;
}

.badge-danger {
    background: #e74c3c;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: #667eea;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 12px;
}

.product-title a {
    text-decoration: none;
    color: #2c3e50;
}

.product-title a:hover {
    color: #667eea;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 15px;
}

/* Product Details Page */
.breadcrumb {
    padding: 20px 0;
    color: #7f8c8d;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #f0f0f0;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #667eea;
    transform: scale(1.05);
}

.product-details-info h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.product-category-badge {
    display: inline-block;
    background: #f0f1ff;
    color: #667eea;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 20px;
}

.product-price-large {
    font-size: 36px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 25px;
}

.product-meta {
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
    margin-bottom: 25px;
}

.meta-item {
    margin-bottom: 15px;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.status-instock {
    color: #27ae60;
    font-weight: 600;
}

.status-lowstock {
    color: #f39c12;
    font-weight: 600;
}

.status-outofstock {
    color: #e74c3c;
    font-weight: 600;
}

.size-options,
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.size-badge,
.color-badge {
    padding: 8px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
}

.product-description {
    margin-bottom: 25px;
}

.product-description h3 {
    margin-bottom: 10px;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.product-note {
    background: #fff3cd;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #f39c12;
}

/* Finalize Payment Page */
.finalize-container {
    padding: 40px 0;
}

.finalize-container h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    margin-bottom: 30px;
}

.finalize-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.info-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.info-box h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.product-summary {
    display: flex;
    gap: 20px;
}

.product-summary-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.product-summary-info h3 {
    margin-bottom: 8px;
}

.product-summary-info .category {
    color: #667eea;
    font-size: 14px;
    margin-bottom: 10px;
}

.steps-list {
    padding-left: 20px;
}

.steps-list li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.summary-table {
    width: 100%;
}

.summary-table td {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-table td:last-child {
    text-align: right;
}

.total-row {
    border-top: 2px solid #2c3e50;
    font-size: 18px;
}

.contact-details {
    font-size: 14px;
}

.contact-item {
    margin-bottom: 20px;
}

.contact-item strong {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
}

.note-box {
    background: #fff3cd;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

/* Auth Pages */
.auth-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
}

.auth-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

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

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #95a5a6;
}

.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 200px 1fr;
        gap: 20px;
    }

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

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .products-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

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

    .product-details {
        grid-template-columns: 1fr;
    }

    .finalize-layout {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .product-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .search-box form {
        flex-direction: column;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .thumbnail-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .auth-box {
        padding: 30px 20px;
    }
}
