/* BestCouponsHub Custom Styles */

:root {
    --primary-color: #FF6B35;
    --secondary-color: #004E89;
    --accent-color: #F7B32B;
    --text-dark: #1A1A2E;
    --text-muted: #6B7280;
    --bg-light: #FFF5E6;
    --bg-gradient-start: #FF6B35;
    --bg-gradient-end: #FF8C42;
    --success-color: #2ECC71;
    --danger-color: #E74C3C;
    --card-bg: #FFFFFF;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Roboto', 'Segoe UI', 'Helvetica', sans-serif;
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.6;
    background: linear-gradient(180deg, #FFF5E6 0%, #FFFFFF 50%);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #C33124 0%, #E94B3C 50%, #FF6B35 100%);
    min-height: 450px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.hero-section h1,
.hero-section .lead,
.hero-section p {
    color: #FFFFFF !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section h1 {
    font-weight: 700;
}

.bg-gradient {
    background: linear-gradient(135deg, #C33124 0%, #E94B3C 50%, #FF6B35 100%);
}

/* Hover Effects */
.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

/* Store Cards */
.store-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.store-card:hover {
    text-decoration: none;
}

.store-card img,
.store-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.store-logo-large {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Center all store logos */
.card-body img[alt*="logo"],
.card img[src*="storage/stores"],
img[src*="storage/stores"] {
    object-fit: contain;
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Force horizontal centering for logo containers */
.logo-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.logo-container img {
    margin: 0 auto !important;
}

/* Coupon Cards */
.coupon-card {
    transition: all 0.3s ease;
}

.coupon-card:hover {
    transform: translateY(-4px);
}

.discount-badge {
    margin: 15px 0;
}

.discount-badge .badge {
    font-size: 1.1rem;
    padding: 10px 20px;
    font-weight: 600;
}

/* Code Box (not used anymore, kept for compatibility) */
.code-box {
    background: var(--bg-light);
    border: 2px dashed #9CA3AF;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    position: relative;
}

.coupon-code {
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color);
    background: transparent;
    border: none;
    padding: 0;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 12px 28px;
    min-height: 44px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF8C42 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FF8C42 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 53, 0.3);
}

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

.btn-warning {
    background: linear-gradient(135deg, var(--accent-color) 0%, #FFD93D 100%);
    border: none;
    color: var(--text-dark);
    font-weight: 700;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #FFD93D 0%, var(--accent-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(247, 179, 43, 0.3);
}

/* Cards */
.card {
    border-radius: 12px;
    overflow: hidden;
}

/* Form Controls */
.form-control {
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    padding: 12px 16px;
    font-size: 16px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Badges */
.badge {
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 600;
}

/* Rating Stars */
.rating i {
    font-size: 1.1rem;
}

/* Footer */
footer a:hover {
    color: var(--accent-color) !important;
}

footer .hover-primary {
    color: #B0B0B0 !important;
}

footer .hover-primary:hover {
    color: #FF6B35 !important;
    transition: all 0.3s ease;
    transform: translateX(5px);
}

footer .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

footer input[type="email"]:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: #FF6B35 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25) !important;
}

/* Cookie Consent Banner */
.cookie-consent {
    animation: slideUp 0.5s ease-out;
}

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

/* Navbar */
.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
}

/* Search Form */
.input-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* Success Toast */
.toast-success {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

/* Pagination */
.pagination {
    gap: 5px;
}

.page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #E5E7EB;
    color: var(--primary-color);
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Store Page - New Design */
.store-logo-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.store-logo-circle img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.store-main-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

.store-verification {
    margin-top: 0.5rem;
}

.store-rating {
    margin-top: 0.25rem;
}

.verified-badge {
    color: var(--success-color);
    font-size: 0.875rem;
    font-weight: 600;
}

.rating {
    font-size: 0.875rem;
}

.rating i {
    font-size: 0.9rem;
}

/* Sidebar */
.sidebar-card {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.sidebar-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.sidebar-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.related-stores-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.related-store-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-store-card {
    width: 100%;
}

/* Center all store logos */
.card-body img[alt*="logo"],
.card img[src*="storage/stores"],
img[src*="storage/stores"] {
    object-fit: contain;
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Force horizontal centering for logo containers */
.logo-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.logo-container img {
    margin: 0 auto !important;
}

/* Coupon Tabs */
.coupon-tabs-container {
    margin-bottom: 1.5rem;
}

.coupon-tabs {
    border-bottom: 1px solid #E5E7EB;
}

.coupon-tabs .nav-link {
    border: none;
    border-radius: 0;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #6B7280;
    background: transparent;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.coupon-tabs .nav-link:hover {
    color: var(--primary-color);
    background: transparent;
}

.coupon-tabs .nav-link.active {
    color: var(--primary-color);
    background: transparent;
    border-bottom-color: var(--primary-color);
}

/* Coupon Cards */
.coupons-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.coupon-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #E5E7EB;
    position: relative;
    transition: all 0.3s ease;
}

.coupon-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.verified-badge {
    position: absolute;
    top: -8px;
    right: 1rem;
    background: var(--success-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.coupon-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.coupon-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.store-logo-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F8F9FA;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.store-logo-mini img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.store-logo-mini i {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.coupon-info {
    flex: 1;
}

.coupon-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.coupon-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.coupon-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.coupon-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.get-code-btn, .get-deal-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.get-code-btn:hover, .get-deal-btn:hover {
    background: #E94B3C;
    color: white;
    transform: translateY(-1px);
}

.details-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.details-btn:hover {
    color: var(--primary-color);
}

/* Modal Styles */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #E5E7EB;
    padding: 1.5rem 1.5rem 1rem;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-body {
    padding: 1rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #E5E7EB;
    padding: 1rem 1.5rem 1.5rem;
}

.coupon-details .detail-row {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.coupon-details .detail-row strong {
    color: var(--text-dark);
    font-weight: 600;
    margin-right: 0.5rem;
}

.terms-list {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.terms-list li {
    margin-bottom: 0.5rem;
}

.terms-list li:last-child {
    margin-bottom: 0;
}

/* Hide grid/list toggle */
.view-toggle {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .store-logo-large {
        width: 80px;
        height: 80px;
    }
    
    /* Store Header Mobile */
    .store-main-title {
        font-size: 1.5rem !important;
    }
    
    .store-logo-circle {
        width: 50px !important;
        height: 50px !important;
    }
    
    .store-logo-circle img {
        width: 32px !important;
        height: 32px !important;
    }
    
    .store-header .rating i {
        font-size: 0.8rem;
    }
    
    .store-verification {
        margin-top: 0.25rem !important;
    }
    
    .store-rating {
        margin-top: 0.25rem !important;
    }
    
    /* Coupon Cards Mobile */
    .coupon-card {
        padding: 1rem !important;
    }
    
    .coupon-title {
        font-size: 1rem !important;
    }
    
    .coupon-description {
        font-size: 0.85rem !important;
    }
    
    .get-code-btn, .get-deal-btn {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.85rem !important;
    }
    
    
    /* Tabs Mobile */
    .coupon-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
        margin-right: 0.25rem;
    }
    
    /* Store page sections - reduce spacing */
    .store-header {
        padding: 1rem 0 !important;
    }
    
    .main-content {
        padding: 1rem 0 !important;
    }
    
    /* Mobile sidebar */
    .sidebar-card {
        padding: 1rem !important;
        margin-top: 1rem;
    }
    
    .sidebar-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .sidebar-text {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Mobile related stores grid */
    .related-stores-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .related-store-card .card-body {
        padding: 0.75rem !important;
    }
    
    .related-store-card .logo-container {
        height: 50px !important;
    }
    
    .related-store-card .logo-container img {
        max-height: 50px !important;
    }
    
    .related-store-card .card-title {
        font-size: 0.8rem !important;
    }
    
    .related-store-card .text-muted {
        font-size: 0.7rem !important;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h5 {
        font-size: 1rem;
    }
}

/* Loading Animation */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.copy-success {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

.copy-success.show {
    display: block;
}

/* Icon Box */
.icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: #EFF6FF;
    color: var(--primary-color);
}

.accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Image Lazy Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

