/* 
 * Coupons Star - Main Stylesheet
 * 
 * Variables & Root Settings
 */
:root {
    --primary: #4d54a0;
    --accent: #3393ea;
    --success: #56b900;
    --expired: #666666;
    --error: #dc2257;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #777777;
    --border-color: #eeeeee;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --font-family: 'Lato', sans-serif;
    --header-height: 70px;
}

/* 1. CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
    list-style: none;
}

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

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input, select, textarea {
    font-family: inherit;
}

/* 2. Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

strong {
    font-weight: 700;
}

em {
    font-style: italic;
}

/* 3. Layout */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    display: flex;
    gap: 30px;
    margin: 40px 0;
}

.sidebar {
    width: 270px;
    flex-shrink: 0;
}

.content-area {
    flex: 1;
    min-width: 0;
}

/* 4. Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--primary);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-brand .star-icon {
    color: #ffca28;
    margin-left: 8px;
    font-size: 1.8rem;
}

.navbar-brand:hover {
    color: #fff;
    opacity: 0.9;
}

.navbar-search {
    position: relative;
    width: 400px;
}

.navbar-search input {
    width: 100%;
    padding: 10px 40px 10px 20px;
    border-radius: 20px;
    border: none;
    outline: none;
    font-size: 1rem;
}

.navbar-search .search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.2rem;
}

.navbar-menu {
    display: flex;
    gap: 20px;
}

.navbar-menu a {
    color: #fff;
    font-weight: 600;
}

.navbar-menu a:hover {
    color: var(--accent);
}

.mobile-menu-toggle {
    display: none;
    color: #fff;
    font-size: 1.8rem;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-md);
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    padding: 20px;
}

.mobile-menu li {
    margin-bottom: 15px;
}

.mobile-menu a {
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
}

.body-pad-top {
    padding-top: var(--header-height);
}

/* Elegant Brand Logo Placeholders */
.logo-box-demo {
    width: 100%;
    height: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffffff;
    background: linear-gradient(135deg, #4d54a0 0%, #3393ea 100%);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(77, 84, 160, 0.25);
    user-select: none;
    letter-spacing: -1px;
}
.store-card-logo .logo-box-demo {
    font-size: 1.8rem;
}
.rating-star.active, .rating-star:hover {
    color: #ffca28 !important;
}

/* 5. Homepage */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 80px 20px;
    text-align: center;
    color: #fff;
}

.hero-section h1 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.hero-search input {
    width: 100%;
    padding: 15px 50px 15px 25px;
    border-radius: 30px;
    border: none;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    outline: none;
}

.hero-search .search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.5rem;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    margin-top: 10px;
    z-index: 100;
    display: none;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--text-main);
}

.autocomplete-item:hover {
    background-color: var(--bg-color);
}

.autocomplete-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.section-title {
    text-align: center;
    margin: 60px 0 30px;
    font-size: 2.2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.store-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

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

.store-card-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.store-card-logo img {
    max-height: 100%;
    max-width: 100%;
}

.store-card-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.store-card-count {
    background-color: var(--bg-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.az-directory {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 60px;
}

.az-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.az-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--bg-color);
    color: var(--text-main);
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
}

.az-links a:hover {
    background-color: var(--primary);
    color: #fff;
}

/* 6. Store Detail Page */
.store-header {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.store-header-logo {
    width: 120px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
}

.store-header-info {
    flex: 1;
}

.store-header-info h1 {
    margin-bottom: 5px;
}

.store-domain-link {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.store-stats-table {
    display: flex;
    gap: 40px;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

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

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

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.sidebar-widget {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

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

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1rem;
}

.filter-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.filter-label input {
    margin-right: 10px;
    width: 16px;
    height: 16px;
}

.coupon-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.coupon-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
    border: 1px solid var(--border-color);
}

.coupon-card:hover {
    box-shadow: var(--shadow-md);
}

.coupon-card.best-offer {
    border-top: 4px solid #ff9800;
}

.best-offer-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff9800;
    color: #fff;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-bottom-left-radius: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.coupon-left {
    width: 150px;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #fff;
    text-align: center;
    flex-shrink: 0;
}

.coupon-card[data-discount="percent_off"] .coupon-left { background-color: var(--accent); }
.coupon-card[data-discount="price_off"] .coupon-left { background-color: var(--error); }
.coupon-card[data-discount="free_shipping"] .coupon-left { background-color: var(--success); }
.coupon-card[data-discount="deal"] .coupon-left { background-color: var(--primary); }
.coupon-card.expired .coupon-left { background-color: var(--expired) !important; }

.discount-value {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 5px;
}

.discount-type-text {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.coupon-middle {
    padding: 25px 20px;
    flex: 1;
}

.coupon-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.coupon-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.coupon-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge-verified {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.coupon-right {
    width: 200px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px dashed var(--border-color);
    flex-shrink: 0;
}

.btn-get-code {
    width: 100%;
    padding: 12px 10px;
    background: #fff;
    border: 2px dashed var(--primary);
    color: var(--primary);
    font-weight: 700;
    border-radius: 4px;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.btn-get-code::after {
    content: 'GET CODE';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    background: var(--primary);
    color: #fff;
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s;
}

.btn-get-code:hover::after {
    width: 100%;
}

.btn-get-deal {
    width: 100%;
    padding: 14px 10px;
    background: var(--primary);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 4px;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-get-deal:hover {
    background: var(--accent);
}

.expired-section {
    margin-top: 40px;
    display: none;
}

.expired-section.active {
    display: block;
}

.coupon-card.expired {
    opacity: 0.7;
    filter: grayscale(100%);
}

.coupon-card.expired .coupon-left {
    background-color: var(--expired);
}

.coupon-card.expired .btn-get-code::after,
.coupon-card.expired .btn-get-deal {
    background-color: var(--expired);
    content: 'EXPIRED';
}

.store-description-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-top: 40px;
}

.desc-content {
    max-height: 200px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s ease;
}

.desc-content.expanded {
    max-height: 2000px;
}

.desc-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
}

.desc-content.expanded .desc-overlay {
    display: none;
}

.btn-show-more {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

/* 7. Coupon Detail Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.coupon-modal {
    background: #fff;
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
    margin: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .coupon-modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.modal-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px dashed var(--border-color);
}

.modal-store-logo {
    width: 100px;
    height: 75px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-store-logo img {
    max-height: 100%;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.code-box-wrapper {
    display: flex;
    max-width: 400px;
    margin: 0 auto 30px;
    border: 2px dashed var(--primary);
    border-radius: 8px;
    overflow: hidden;
    height: 60px;
}

.code-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    background: var(--bg-color);
    letter-spacing: 2px;
}

.btn-copy {
    width: 120px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    transition: background 0.3s;
}

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

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

.modal-continue-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.3s;
}

.modal-continue-btn:hover {
    background: var(--accent);
    color: #fff;
}

/* 8. Search Page */
.search-header {
    background: var(--card-bg);
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.search-header input {
    width: 100%;
    max-width: 600px;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    font-size: 1.2rem;
    outline: none;
}

.search-header input:focus {
    border-color: var(--primary);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 8px;
}

/* 9. Footer */
.footer {
    background: #363636;
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
}

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

.footer-widget h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

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

.footer-links a {
    color: #aaa;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #aaa;
    font-size: 0.9rem;
}

/* 10. Admin Panel */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f4f6f9;
}

.admin-sidebar {
    width: 250px;
    background: #343a40;
    color: #fff;
    flex-shrink: 0;
}

.admin-sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #4b545c;
    font-weight: 700;
    font-size: 1.2rem;
}

.admin-nav {
    padding: 20px 0;
}

.admin-nav a {
    display: block;
    padding: 12px 20px;
    color: #c2c7d0;
    border-left: 3px solid transparent;
}

.admin-nav a:hover, .admin-nav a.active {
    background: #4b545c;
    color: #fff;
    border-left-color: var(--primary);
}

.admin-main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.admin-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    padding: 20px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-top: 3px solid var(--primary);
}

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

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

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

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

.admin-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.admin-form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.admin-login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #e9ecef;
}

.admin-login-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

/* 11. Components */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

.rating-stars {
    display: inline-flex;
    color: #e0e0e0;
    font-size: 1.2rem;
}

.rating-stars .star {
    cursor: pointer;
    transition: color 0.2s;
}

.rating-stars .star.filled,
.rating-stars .star:hover,
.rating-stars .star:hover ~ .star {
    color: #ffca28;
}

.rating-stars:hover .star {
    color: #ffca28;
}

.rating-stars:hover .star:hover ~ .star {
    color: #e0e0e0;
}

.breadcrumb {
    display: flex;
    padding: 15px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
}

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

.breadcrumb-separator {
    margin: 0 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-verified { background: rgba(86, 185, 0, 0.1); color: var(--success); }
.badge-expired { background: rgba(102, 102, 102, 0.1); color: var(--expired); }

.go-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 900;
}

.go-top.visible {
    opacity: 1;
    visibility: visible;
}

.go-top:hover {
    background: var(--accent);
    transform: translateY(-5px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,0,0,0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* 12. Responsive Breakpoints */
@media (max-width: 1100px) {
    .main-content {
        flex-direction: column;
    }
    .navbar-search {
        width: 300px;
        max-width: 100%;
    }
    .sidebar {
        width: 100%;
        display: flex;
        gap: 20px;
        overflow-x: auto;
    }
    .sidebar-widget {
        min-width: 250px;
        flex: 1;
        margin-bottom: 0;
    }
    .store-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }
    .navbar-search {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .mobile-search {
        display: block;
        padding: 12px 15px;
        background: rgba(0,0,0,0.15);
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .mobile-search input {
        width: 100%;
        padding: 10px 15px;
        border-radius: 20px;
        border: none;
        outline: none;
        font-size: 0.95rem;
        box-sizing: border-box;
    }
    .hero-section {
        padding: 40px 15px;
    }
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    .hero-search input {
        font-size: 1rem;
        padding: 12px 45px 12px 18px;
    }
    .sidebar {
        flex-direction: column;
        overflow-x: visible;
        width: 100%;
        gap: 15px;
    }
    .sidebar-widget {
        min-width: 100%;
        width: 100%;
        margin-bottom: 15px;
        box-sizing: border-box;
    }
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .store-header {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }
    .store-header-logo {
        margin: 0 auto 15px;
    }
    .store-stats-table {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .coupon-card {
        flex-direction: column;
    }
    .coupon-left {
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
    }
    .coupon-middle {
        padding: 15px;
    }
    .coupon-meta {
        flex-wrap: wrap;
        gap: 8px 12px;
    }
    .coupon-right {
        width: 100%;
        border-left: none;
        border-top: 1px dashed var(--border-color);
        padding: 15px;
        box-sizing: border-box;
    }
    .coupon-modal {
        width: calc(100% - 30px);
        margin: 15px auto;
        border-radius: 8px;
    }
    .modal-header {
        padding: 20px 20px 15px;
    }
    .modal-body {
        padding: 15px 20px 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    .admin-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .code-box-wrapper {
        flex-direction: column;
        height: auto;
    }
    .btn-copy {
        width: 100%;
        padding: 12px 15px;
    }
    .code-text {
        padding: 12px 15px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    .section-title {
        font-size: 1.4rem;
        margin: 30px 0 15px;
    }
    .store-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    .store-stats-table {
        gap: 10px;
    }
    .stat-value {
        font-size: 1.1rem;
    }
    .discount-value {
        font-size: 1.5rem;
    }
}

/* 13. Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in { animation: fadeIn 0.5s ease forwards; }
.slide-up { animation: slideUp 0.5s ease forwards; }
