@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --primary-color: #d63384;
    --primary-dark: #b7266d;
    --primary-soft: #fff1f7;
    --secondary-color: #7a5c78;
    --pink-light: #fce4ec;
    --violet-light: #f5eef8;
    --text-main: #2f2431;
    --text-muted: #756777;
    --surface: #fffdfd;
    --surface-alt: #fbf8fb;
    --border-soft: #eadce4;
    --shadow-soft: 0 18px 40px rgba(56, 35, 51, 0.08);
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main);
    background: linear-gradient(180deg, #fff 0%, #fffafc 100%);
    letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.premium-brand {
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: 0.01em;
}

p,
label,
.form-label,
.nav-link,
.btn,
.card-text,
.text-muted,
.summary-line,
.summary-item-meta {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

a {
    color: var(--primary-color);
}

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

.btn {
    border-radius: 999px;
    padding: 0.8rem 1.35rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #e95a9f);
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(214, 51, 132, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-color: transparent;
    box-shadow: 0 16px 28px rgba(214, 51, 132, 0.25);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 1px solid rgba(214, 51, 132, 0.35);
    background-color: rgba(255, 255, 255, 0.88);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff;
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    box-shadow: 0 12px 24px rgba(214, 51, 132, 0.16);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.card {
    border-radius: 22px;
}

/* Navigation */
.premium-navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.94) !important;
}

.premium-brand {
    font-size: 1.85rem;
    color: var(--primary-color) !important;
}

.premium-nav-links .nav-link {
    color: var(--text-main);
    font-weight: 500;
    position: relative;
    padding: 0.75rem 1rem !important;
}

.premium-nav-links .nav-link::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.4rem;
    height: 2px;
    border-radius: 999px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.premium-nav-links .nav-link:hover::after,
.premium-nav-links .nav-link.is-active::after {
    transform: scaleX(1);
}

.premium-nav-links .nav-link.is-active {
    font-weight: 700;
    color: var(--primary-color);
}

.premium-navbar-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-search-slot {
    width: min(100%, 320px);
}

.navbar-actions {
    flex-shrink: 0;
}

/* Search */
.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-container .form-control,
.search-container .btn {
    border-radius: 999px;
}

.search-container .form-control {
    padding-left: 1rem;
    border-color: var(--border-soft);
}

.search-container .btn {
    margin-left: -48px;
    z-index: 3;
    border: 0;
    background: transparent;
    color: var(--primary-color);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
}

.suggestion-item {
    display: flex;
    padding: 0.9rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f4edf2;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #fdf6fa;
}

.suggestion-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 0.85rem;
    border-radius: 12px;
}

.suggestion-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.suggestion-price {
    color: var(--primary-color);
    font-size: 0.9em;
}

/* Hero Section */
.hero-section {
    overflow: hidden;
}

.hero-carousel {
    position: relative;
}

.hero-slide {
    display: flex;
    align-items: center;
    padding: 60px 0;
}

/* Product Cards */
.product-card {
    background: linear-gradient(180deg, #fff 0%, #fffdfd 100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 16px 32px rgba(47, 36, 49, 0.08) !important;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 36px rgba(47, 36, 49, 0.14) !important;
}

.product-card img {
    transition: transform 0.3s ease;
}

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

.product-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(47, 36, 49, 0.16);
}

.product-badge-new {
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-color);
}

.product-badge-best {
    background: rgba(35, 108, 82, 0.9);
    color: #fff;
}

.product-badge-sale {
    background: rgba(47, 36, 49, 0.88);
    color: #fff;
}

/* Features */
.feature-box {
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

/* Social Links */
.social-icon-link {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.4rem;
    color: var(--primary-color);
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #f1c5d8;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.social-icon-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(214, 51, 132, 0.18);
    color: #b82b70;
}

/* Footer */
footer {
    background: linear-gradient(180deg, #fff8fb 0%, #fcecf3 100%);
    border-top: 1px solid var(--border-soft);
}

/* Product Detail */
.product-images img {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.product-images img:hover {
    transform: scale(1.05);
}

/* Forms */
.form-control,
.form-select {
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    padding: 0.9rem 1rem;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus,
.checkout-field:focus {
    border-color: rgba(214, 51, 132, 0.55);
    box-shadow: 0 0 0 0.25rem rgba(214, 51, 132, 0.12);
}

.form-control.invalid,
.form-select.invalid,
.input-validation-error {
    border-color: #dc3545;
}

.validation-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.35rem;
}

.checkout-card,
.summary-card {
    background: linear-gradient(180deg, #fff 0%, var(--surface-alt) 100%);
    box-shadow: var(--shadow-soft);
}

.summary-header {
    margin-bottom: 1.25rem;
}

.summary-kicker {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.summary-item,
.summary-line,
.summary-total {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.summary-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid #f1e8ee;
}

.summary-item-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.summary-item-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.summary-line {
    padding: 0.75rem 0;
}

.summary-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-soft) 18%, var(--border-soft) 82%, transparent 100%);
    margin: 0.5rem 0;
}

.summary-total {
    padding: 1rem 0 1.25rem;
    font-size: 1.05rem;
}

/* Cart */
.cart-item-card {
    background: linear-gradient(180deg, #fff 0%, #fffdfd 100%);
}

.cart-item-layout {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto auto;
    gap: 1.25rem;
    align-items: center;
}

.cart-item-thumbnail {
    width: 110px;
    height: 110px;
    border-radius: 18px;
    object-fit: cover;
}

.cart-item-price {
    font-weight: 600;
}

.cart-item-total {
    text-align: right;
}

.cart-line-total {
    font-size: 1.05rem;
}

/* Quantity Controls */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    overflow: hidden;
}

.quantity-selector-compact {
    min-width: 138px;
}

.quantity-btn {
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.quantity-btn:hover,
.quantity-btn:focus {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.quantity-input {
    width: 52px;
    border: 0;
    background: transparent;
    text-align: center;
    font-weight: 700;
    color: var(--text-main);
}

.quantity-input:focus {
    outline: none;
}

/* Checkout */
.checkout-form {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

/* Admin */
.admin-sidebar {
    background-color: #f8f9fa;
    min-height: calc(100vh - 60px);
}

.admin-sidebar .nav-link {
    color: #333;
    padding: 10px 20px;
}

.admin-sidebar .nav-link:hover {
    background-color: #e9ecef;
}

.admin-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

.text-decoration-none {
    text-decoration: none !important;
}

/* -------------------------
   Admin Responsive Styles
   ------------------------- */

.admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.admin-sidebar-overlay.show {
    display: block;
}

.admin-mobile-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1060;
    background: #343a40;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 991.98px) {
    .premium-navbar-tools {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding-top: 1rem;
    }

    .navbar-search-slot {
        width: 100%;
    }

    .navbar-actions {
        justify-content: space-between;
    }

    .cart-item-layout {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 1rem;
        align-items: start;
    }

    .cart-item-thumbnail {
        width: 88px;
        height: 88px;
    }

    .cart-item-actions {
        grid-column: 2;
    }

    .cart-item-total {
        grid-column: 2;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .hero-slide {
        text-align: center;
    }
    
    .hero-slide h1 {
        font-size: 2rem;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 767.98px) {
    .admin-mobile-toggle {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        z-index: 1050;
        transition: left 0.3s ease;
        height: 100vh;
        overflow-y: auto;
    }

    .admin-sidebar.show {
        left: 0;
    }

    .admin-content {
        margin-left: 0 !important;
    }

    .modal-dialog {
        max-width: 100%;
        margin: 0.5rem;
    }

    .admin-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-topbar {
        padding-left: 50px !important;
    }

    .summary-card .card-body,
    .checkout-card .card-body {
        padding: 1.5rem !important;
    }
}
