/* Rozon Love Store - Main Stylesheet */

/* CSS Variables for Romantic Theme */
:root {
    --primary-color: #e91e63;
    --secondary-color: #ff6b9d;
    --accent-color: #ffd700;
    --dark-color: #2c1810;
    --light-color: #fff5f7;
    --cream-color: #faf0e6;
    --text-color: #333;
    --text-light: #666;
    --border-color: #f0d0d8;
    --success-color: #4caf50;
    --error-color: #f44336;
    --shadow: 0 2px 10px rgba(233, 30, 99, 0.1);
    --shadow-hover: 0 5px 20px rgba(233, 30, 99, 0.2);
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

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

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

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

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-actions a {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    position: relative;
}

.cart-count {
    background: var(--accent-color);
    color: var(--dark-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    position: absolute;
    top: -8px;
    right: -8px;
}

/* Navigation */
.nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-top: 0.5rem;
    border-radius: 50px;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.75rem 0;
}

.nav-list a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-list a:hover,
.nav-list a.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.9), rgba(255, 107, 157, 0.9)),
                url('../images/hero-bg.jpg') center/cover;
    color: white;
    padding: 5rem 0;
    text-align: center;
}

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

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.btn-secondary:hover {
    background: #ffed4e;
    transform: translateY(-2px);
}

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

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

/* Section */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '♥';
    display: block;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--cream-color);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: var(--dark-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

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

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Cart */
.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    padding: 0.25rem;
}

/* Cart Summary */
.cart-summary {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row.total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: none;
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--error-color);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    .header-actions {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    .header-actions form {
        width: auto !important;
        max-width: 100%;
    }
    
    .header-actions input[type="text"] {
        width: 180px !important;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Typography */
    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1rem !important;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Header */
    .header {
        padding: 0.75rem 0;
    }
    
    .header-top {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .logo {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .header-actions form {
        width: 100% !important;
        display: flex !important;
    }
    
    .header-actions input[type="text"] {
        width: 100% !important;
        flex: 1;
    }
    
    .header-actions > a {
        justify-content: center;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }
    
    /* Navigation */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .nav {
        margin-top: 1rem;
        border-radius: 15px;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-list.active {
        max-height: 500px;
        padding: 0.5rem 0;
    }
    
    .nav-list li {
        width: 100%;
    }
    
    .nav-list a {
        display: block;
        padding: 0.75rem 1.5rem;
        border-radius: 0;
        text-align: center;
    }
    
    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .product-card {
        font-size: 0.9rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
    
    /* Cart */
    .cart-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
    
    /* Buttons */
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    /* Forms */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Quantity Controls */
    .quantity-control {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .quantity-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-section {
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 1.5rem !important;
    }
    
    .hero p {
        font-size: 0.9rem !important;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-image {
        height: 250px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-height: 44px; /* Touch-friendly tap target */
    }
    
    .cart-item-image {
        height: 150px;
    }
    
    .data-table {
        overflow-x: auto;
        display: block;
    }
    
    .data-table table {
        min-width: 600px;
    }
    
    /* Touch-friendly tap targets */
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .quantity-btn {
        width: 44px;
        height: 44px;
    }
}

/* Utility Classes for Responsive Layouts */
.flex-center {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.flex-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

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

.padding-2 {
    padding: 2rem;
}

.padding-3 {
    padding: 3rem;
}

@media (max-width: 768px) {
    .grid-2col,
    .cart-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    
    .flex-center,
    .flex-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .flex-center > *,
    .flex-buttons > * {
        width: 100%;
    }
}

/* Admin Styles */
.admin-header {
    background: var(--dark-color);
    color: white;
    padding: 1rem 0;
}

.admin-nav {
    background: #3a2419;
    padding: 1rem 0;
}

.admin-nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.admin-nav-list a {
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.admin-nav-list a:hover,
.admin-nav-list a.active {
    background: var(--primary-color);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 1rem;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.data-table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
    background: var(--light-color);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

.badge-warning {
    background: #ff9800;
    color: white;
}

.badge-danger {
    background: var(--error-color);
    color: white;
}

.badge-info {
    background: #2196f3;
    color: white;
}
