/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
    text-align: center;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-accent {
    background-color: var(--accent);
}

.btn-accent:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: var(--success);
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--secondary);
    border-radius: 2px;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    position: relative;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
}

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

.logo i {
    margin-right: 10px;
    color: var(--accent);
}

nav ul {
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 30px;
    position: relative;
}

nav ul li a {
    font-weight: 600;
    transition: var(--transition);
    padding: 5px 0;
}

nav ul li a:hover {
    color: var(--secondary);
}

.cart-badge {
    background-color: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-left: 5px;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.85), rgba(52, 152, 219, 0.85)), url('../images/design1.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 150px 0;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll; /* Better performance on mobile */
    }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 40px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

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

.product-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.product-card .product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-img {
    width: 100%;
    height: auto;
    min-height: 250px;
    max-height: 350px;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
    display: block;
    transition: var(--transition);
    padding: 10px;
}

.product-card:hover .product-img {
    transform: scale(1.02);
    background-color: #f0f0f0;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info .btn,
.product-info .btn-small {
    margin-top: auto;
}

.product-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 15px;
}

/* Form Styles */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: var(--success);
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: var(--danger);
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning);
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: var(--secondary);
    color: #0c5460;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: white;
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary);
    border-radius: 2px;
}

.footer-column ul li {
    margin-bottom: 12px;
    transition: var(--transition);
}

.footer-column ul li:hover {
    transform: translateX(5px);
}

.footer-column ul li a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Page Styles */
.page {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

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

table th,
table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--primary);
}

table tr:hover {
    background-color: #f8f9fa;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-pending {
    background-color: #fff3cd;
    color: #856404;
}

.badge-approved {
    background-color: #d4edda;
    color: #155724;
}

.badge-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-delivered {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.dashboard-card {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.dashboard-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.dashboard-card .value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
}

/* Payment Info Box */
.payment-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    border-left: 4px solid var(--secondary);
}

.payment-info h4 {
    margin-bottom: 10px;
    color: var(--primary);
}

.payment-info p {
    margin-bottom: 5px;
}

/* File Upload */
.file-upload {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    margin: 15px 0;
    transition: var(--transition);
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--secondary);
    background-color: #f8f9fa;
}

.file-upload i {
    font-size: 2rem;
    color: #777;
    margin-bottom: 10px;
}

.file-upload input {
    display: none;
}

/* Order Summary */
.order-summary {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.order-summary h4 {
    margin-bottom: 10px;
    color: var(--primary);
}

.order-summary p {
    margin-bottom: 5px;
}

/* Feedback Section */
.feedback-section {
    padding: 80px 0;
}

.feedback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feedback-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feedback-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.feedback-content {
    padding: 20px;
}

.feedback-author {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.feedback-rating {
    color: #ffc107;
    font-size: 1rem;
}

.feedback-item img,
.feedback-item video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
}

.feedback-item video {
    max-height: 400px;
}

/* Product Detail Images */
.product-detail-img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: block;
    padding: 20px;
}

/* Loading and placeholder styles */
img[src=""],
img:not([src]) {
    opacity: 0;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

/* Better form styling */
.form-control:disabled,
.form-control[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--secondary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Text utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Responsive Styles */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 20px;
        flex-direction: column;
        width: 100%;
        display: none;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 10px 0;
    }

    .mobile-menu-btn {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .hero {
        padding: 100px 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

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

    .form-container {
        padding: 25px;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .product-detail-img {
        max-height: 400px;
    }

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

@media (max-width: 576px) {
    .hero {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

    .form-container {
        padding: 20px;
    }

    .product-detail-img {
        max-height: 300px;
    }

    .product-img {
        min-height: 200px;
        max-height: 250px;
        padding: 5px;
    }

    .product-detail-img {
        padding: 10px;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    nav,
    .btn,
    .mobile-menu-btn {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Product detail page responsive grid */
@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr !important;
    }
}

