/* Custom CSS for eMagazine */

/* ========================================
   COMMON STYLES
   ======================================== */

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.page-breadcrumb {
    margin-bottom: 1.5rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(13, 110, 253, 0.08);
    border-radius: 0.9rem;
    background: #f2f5f8;
}

.page-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.98rem;
}

.page-breadcrumb-item + .page-breadcrumb-item::before {
    content: '>';
    margin-right: 0.45rem;
    color: #adb5bd;
    font-weight: 700;
}

.page-breadcrumb-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

.page-breadcrumb-link:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.page-breadcrumb-current {
    color: #495057;
    font-weight: 600;
}

.required-asterisk {
    color: #dc3545;
    font-weight: 700;
}

@media (max-width: 575.98px) {
    .page-breadcrumb {
        margin-bottom: 1.1rem;
        padding: 0.7rem 0.85rem;
    }

    .page-breadcrumb-item {
        font-size: 0.9rem;
    }
}

/* Header Styles */
.navbar-brand {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-right: 0;
}

.navbar-brand-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    gap: 1rem;
}

.navbar {
    gap: 0.85rem;
    flex-wrap: nowrap;
}

.header-search-form {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 360px;
    flex: 1 1 260px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.header-search-shell {
    position: relative;
    order: 2;
    min-width: 0;
    max-width: 360px;
    flex: 1 1 260px;
}

.header-search-shell .header-search-form {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.header-search-form.active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
}

.header-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.header-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #fff;
    padding: 0.45rem 0.25rem 0.45rem 0;
    outline: none;
}

.header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.header-search-submit {
    border: 0;
    background: transparent;
    color: #fff;
    width: 42px;
    height: 38px;
}

.header-search-submit:hover {
    background: rgba(255, 255, 255, 0.12);
}

.search-highlight {
    padding: 0 0.18em;
    border-radius: 0.25rem;
    background: #ffe08a;
    color: #5f370e;
}

.header-search-suggestions {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    z-index: 1200;
    padding: 0.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.header-search-group + .header-search-group {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eef2f7;
}

.header-search-group-title {
    padding: 0.15rem 0.4rem 0.45rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c757d;
}

.header-search-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.7rem 0.75rem;
    border-radius: 0.85rem;
    color: #212529;
    text-decoration: none;
}

.header-search-suggestion:hover {
    background: #f8fafc;
    color: #0d6efd;
}

.header-search-suggestion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #eef5ff;
    color: #0d6efd;
    flex-shrink: 0;
}

.header-search-suggestion-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-search-suggestion-title {
    font-weight: 700;
    color: inherit;
}

.header-search-suggestion-meta {
    color: #6c757d;
    font-size: 0.88rem;
}

.header-search-empty {
    padding: 0.85rem 0.9rem;
    color: #6c757d;
    font-size: 0.92rem;
}

.header-search-footer {
    margin-top: 0.5rem;
    padding: 0.7rem 0.85rem 0.25rem;
    border-top: 1px solid #eef2f7;
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1.4;
}

@media (max-width: 991.98px) {
    .header-search-shell {
        flex: 1 1 140px;
        max-width: none;
    }

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

    .header-search-input {
        font-size: 0.92rem;
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
    }

    .header-search-icon,
    .header-search-submit {
        width: 36px;
    }
}

.navbar-primary-link {
    display: inline-flex;
    align-items: center;
    order: 3;
    flex-shrink: 0;
    padding: 0.35rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-primary-link:hover,
.navbar-primary-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.navbar-toggler {
    flex-shrink: 0;
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.22);
    padding: 0.45rem 0.7rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
    filter: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.4' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler.navbar-menu-open .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.6' d='M7 7l16 16M23 7L7 23'/%3e%3c/svg%3e");
}

.navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    width: 100%;
    z-index: 1200;
    margin-top: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    max-height: none;
    overflow: visible;
    pointer-events: none;
}

.navbar-collapse.show,
.navbar-collapse.collapsing {
    border-top: 0;
    display: block !important;
}

.navbar-collapse.show {
    pointer-events: auto;
}

.navbar-collapse.collapsing {
    pointer-events: none;
    height: auto !important;
    transition: none !important;
}

.navbar {
    position: relative;
    align-items: center;
}

.navbar-brand-row,
.navbar-toggler {
    position: relative;
    z-index: 1202;
}

.navbar > .navbar-collapse > .navbar-nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    padding: 3.2rem 0.9rem 0.9rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(9, 78, 184, 0.98), rgba(13, 110, 253, 0.98));
    box-shadow: 0 20px 45px rgba(8, 35, 89, 0.28);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    pointer-events: auto;
}

.back-to-top-button {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #198754;
    color: #fff;
    box-shadow: 0 14px 28px rgba(25, 135, 84, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
    z-index: 1400;
    pointer-events: none;
}

.back-to-top-button:hover {
    background: #157347;
    color: #fff;
}

.back-to-top-button.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top-button i {
    color: #fff;
    font-size: 1rem;
}

.navbar-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.navbar > .navbar-collapse > .navbar-nav .nav-item {
    width: 100%;
    margin: 0 !important;
}

.navbar > .navbar-collapse > .navbar-nav .nav-link {
    display: block;
    width: 100%;
    padding: 0.75rem 0.35rem !important;
    font-size: 1rem;
    white-space: normal;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

.navbar-nav .nav-link.active {
    color: #fff !important;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
}

/* Desktop menu layout */
@media (min-width: 992px) {
    .navbar-collapse {
        z-index: 1204;
    }

    .navbar-nav {
        flex-wrap: wrap;
        max-width: calc(100% - 150px);
    }
    
    .navbar-nav .nav-item {
        margin: 0.15rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   SHOP CARD STYLES
   ======================================== */

/* Shop logo container */
.shop-logo-container {
    position: relative;
    width: 160px;
    height: 40px;
}

.shop-logo {
    width: 160px;
    height: 40px;
    object-fit: contain;
}

.shop-logo-placeholder {
    width: 160px;
    height: 40px;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.shop-logo-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.shop-logo-text-white {
    color: white;
}

.shop-logo-text-dark {
    color: #212529;
}

/* Shop likes */
.shop-likes {
    color: #6c757d;
}

.shop-likes strong {
    font-weight: bold;
}

/* Shop button spacing */
.shop-button {
    margin-top: 10px;
}

/* Shop description container with fixed height and scroll */
.shop-description-container {
    height: 190px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
}

.shop-description-container::-webkit-scrollbar {
    width: 6px;
}

.shop-description-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.shop-description-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.shop-description-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.shop-detail-logo-container {
    width: 100%;
    max-width: 220px;
    height: 100px;
}

.shop-detail-logo {
    width: 100%;
    height: 100px;
}

.shop-detail-logo-placeholder {
    width: 100%;
    height: 100px;
}

.shop-detail-card {
    border-radius: 1rem;
}

.shop-detail-secondary-card .card-body {
    min-height: 100%;
}

.shop-detail-actions-card .card-body {
    min-height: 300px;
}

.shop-detail-heading-card .card-body {
    min-height: 300px;
}

.shop-detail-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.shop-detail-visit-btn {
    white-space: nowrap;
}

.shop-detail-category-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.shop-detail-payment-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.payment-method-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    width: 100%;
}

.payment-method-tag {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.45rem 0.95rem;
    border: 1px solid #0d6efd;
    border-radius: 0.55rem;
    background-color: transparent;
    color: #0d6efd;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.payment-method-tag:hover {
    background-color: rgba(13, 110, 253, 0.08);
    color: #0a58ca;
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.12);
    transform: translateY(-1px);
}

.taxonomy-sections-card {
    overflow: hidden;
}

.taxonomy-section-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.taxonomy-tag-list {
    align-items: stretch;
}

.taxonomy-chip {
    gap: 0.6rem;
    justify-content: center;
}

.taxonomy-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    overflow: hidden;
    line-height: 0;
}

.taxonomy-chip-icon svg {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    display: block;
}

.taxonomy-chip-icon svg * {
    vector-effect: non-scaling-stroke;
}

.taxonomy-chip-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.payment-method-tag-green {
    border-color: #198754;
    color: #198754;
}

.payment-method-tag-green:hover {
    background-color: rgba(25, 135, 84, 0.08);
    color: #146c43;
    box-shadow: 0 0.5rem 1rem rgba(25, 135, 84, 0.12);
}

.payment-method-tag-orange {
    border-color: #fd7e14;
    color: #fd7e14;
    background-color: rgba(253, 126, 20, 0.08);
}

.payment-method-tag-orange:hover {
    background-color: rgba(253, 126, 20, 0.16);
    color: #ca6510;
    box-shadow: 0 0.5rem 1rem rgba(253, 126, 20, 0.12);
}

.payment-method-description {
    white-space: pre-line;
}

.shop-detail-likes {
    cursor: pointer;
    font-size: 1.2rem;
}

.shop-detail-description {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.shop-detail-description h2,
.shop-detail-description h3 {
    line-height: 1.35;
    margin-top: 15px;
    margin-bottom: 15px;
}

.shop-detail-description h2 {
    color: #2b67a8;
    font-size: 1.45rem;
    font-weight: 600;
}

.shop-detail-description h3 {
    color: #4d7fb8;
    font-size: 1.2rem;
    font-weight: 500;
}

.shop-detail-description h2:first-child,
.shop-detail-description h3:first-child {
    margin-top: 0;
}

.shop-detail-subtitle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    font-size: 1.08rem;
    font-weight: 700;
    color: #198754;
    text-align: left;
    align-self: stretch;
}

.shop-detail-subtitle i {
    color: inherit;
    font-size: 1em;
}

.shop-detail-plain-content {
    color: #495057;
}

.shop-coupons-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.35rem;
    scroll-behavior: smooth;
}

.shop-coupons-list-page {
    max-height: 540px;
}

.shop-coupon-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #ffffff 0%, #fff8ef 100%);
    scroll-margin-top: 110px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.shop-coupon-card.shop-coupon-card-target {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.28rem rgba(13, 110, 253, 0.16), 0 18px 38px rgba(13, 110, 253, 0.12);
    transform: translateY(-2px);
}

.shop-coupon-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.shop-coupon-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.shop-coupon-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #212529;
}

.shop-coupon-share-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
}

.shop-coupon-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #8fd19e;
    border-radius: 0.75rem;
    background: #e8f7ee;
    color: #198754;
    flex-shrink: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.shop-coupon-share-button:hover,
.shop-coupon-share-button:focus {
    background: #d1f0db;
    border-color: #62b47d;
    color: #146c43;
}

.shop-coupon-share-input {
    width: 100%;
    min-width: 0;
    padding: 0.5rem 0.7rem;
    border: 1px solid #8fd19e;
    border-radius: 0.75rem;
    background: #f7fcf8;
    color: #2f5d3a;
    font-size: 0.86rem;
}

.shop-coupon-share-input:focus {
    outline: none;
    border-color: #62b47d;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.12);
}

.shop-coupon-share-feedback {
    font-size: 0.8rem;
    font-weight: 600;
    color: #198754;
    display: none;
    margin-top: -0.1rem;
}

.shop-coupon-share-feedback.is-visible {
    display: block;
}

.shop-coupon-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.shop-coupon-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.shop-coupon-badge-featured {
    background: #fff3cd;
    color: #8a5a00;
}

.shop-coupon-badge-exclusive {
    background: #e7f1ff;
    color: #0d6efd;
}

.shop-coupon-badge-store {
    background: #dceaff;
    color: #0b5ed7;
}

.shop-coupon-store-link {
    text-decoration: none;
    border: 1px solid #a9c8ff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.shop-coupon-store-link:hover {
    background: #bfd8ff;
    color: #084298;
    border-color: #7fb0ff;
}

.shop-coupon-badge-upcoming {
    background: #fff3cd;
    color: #8a5a00;
}

.shop-coupon-badge-active {
    background: #e8f7ee;
    color: #146c43;
}

.shop-coupon-card-upcoming {
    border-color: #ffe29a;
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}

.home-coupons-section {
    background: linear-gradient(180deg, #fff8ea 0%, #ffffff 100%);
    border-radius: 1.2rem;
}

.home-coupons-highlight-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: #ffb703;
    color: #5f370e;
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 24px rgba(255, 183, 3, 0.22);
}

.home-coupons-top-link {
    align-self: flex-start;
    font-weight: 700;
}

.home-coupons-section .row > [class*='col-'] {
    display: flex;
}

.home-coupons-section .shop-coupon-card {
    width: 100%;
}

.home-coupons-section .shop-coupon-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    overflow: hidden;
    min-height: calc(1.55em * 3);
}

.shop-coupon-code {
    flex-shrink: 0;
    padding: 0.45rem 0.8rem;
    border-radius: 0.75rem;
    background: #198754;
    color: #fff;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.shop-coupon-code-masked {
    background: #6c757d;
    color: #fff;
    filter: blur(1.6px);
    user-select: none;
}

.shop-coupon-card:hover .shop-coupon-code-masked,
.shop-coupon-card:focus-within .shop-coupon-code-masked {
    filter: blur(1px);
}

.shop-coupon-description {
    color: #495057;
    line-height: 1.55;
}

.shop-coupon-footer {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.shop-coupon-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    font-weight: 700;
}

.shop-coupon-expiry {
    color: #6c757d;
    font-size: 0.92rem;
}

.shop-promotions-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.35rem;
}

.shop-promotion-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 0.9rem;
    background: #fff;
}

.shop-promotion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.shop-promotion-content {
    color: #495057;
    flex: 1 1 auto;
}

.shop-promotion-content p:last-child,
.shop-promotion-content ul:last-child,
.shop-promotion-content ol:last-child {
    margin-bottom: 0;
}

.shop-promotion-body {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.75rem;
}

.shop-promotion-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.shop-detail-plain-content p:last-child,
.shop-detail-plain-content ul:last-child,
.shop-detail-plain-content ol:last-child {
    margin-bottom: 0;
}

.shop-detail-section-title {
    text-align: center;
}

.shop-detail-section-title i {
    font-size: 1.2em;
    vertical-align: -0.08em;
}

.shop-detail-description::-webkit-scrollbar {
    width: 6px;
}

.shop-detail-description::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.shop-detail-description::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.shop-detail-description::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.shop-detail-info-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

.shop-detail-info-label {
    font-size: 1rem;
    font-weight: 700;
    color: #495057;
    text-align: center;
}

.shop-detail-info-content {
    max-height: 145px;
    overflow-y: auto;
    padding: 0.85rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    background: #fff;
    color: #495057;
}

.shop-detail-info-content p:last-child,
.shop-detail-info-content ul:last-child,
.shop-detail-info-content ol:last-child {
    margin-bottom: 0;
}

.shop-detail-info-content::-webkit-scrollbar {
    width: 6px;
}

.latest-search-queries-table {
    max-height: 420px;
    overflow-y: auto;
}

.shop-detail-info-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.shop-detail-info-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.shop-detail-info-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.shop-coupons-list::-webkit-scrollbar {
    width: 6px;
}

.shop-coupons-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.shop-coupons-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.shop-coupons-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.shop-promotions-list::-webkit-scrollbar {
    width: 6px;
}

.shop-promotions-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.shop-promotions-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.shop-promotions-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

@media (max-width: 991.98px) {
    .shop-detail-top-row {
        justify-content: center;
    }

    .shop-detail-category-row {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .shop-coupon-card-header {
        flex-direction: column;
    }

    .shop-coupon-code {
        align-self: flex-start;
    }

    .shop-coupon-share-row {
        align-items: stretch;
    }

    .shop-promotion-body {
        flex-direction: column;
    }

    .shop-promotion-actions {
        justify-content: flex-start;
    }

    .navbar-brand-row {
        gap: 0.55rem;
    }

    .navbar-primary-link {
        font-size: 0.92rem;
        padding: 0.28rem 0.7rem;
    }

}

/* ========================================
   INDEX PAGE STYLES
   ======================================== */

/* Popular shops section */
.popular-shops-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .popular-shops-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .popular-shops-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.sitemap-link-card {
    border: 1px solid #e9ecef;
    background-color: #fff;
    padding: 1rem;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.sitemap-link-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.12);
    transform: translateY(-2px);
}

/* ========================================
   CATEGORY PAGE STYLES
   ======================================== */

/* Category shops grid */
.category-shops-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .category-shops-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .category-shops-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Search Form Styles */
.input-group .form-control {
    border-radius: 0.375rem 0 0 0.375rem;
}

.input-group .btn {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Main Content Styles */
.display-4 {
    color: #2c3e50;
    font-weight: 700;
}

.lead {
    color: #6c757d;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Button Styles */
.btn-outline-primary {
    border-width: 2px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Footer Styles */
footer {
    margin-top: auto;
}

footer .btn {
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .input-group {
        margin-top: 1rem;
    }
    
    footer .text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}

/* Animation for empty state */
.text-center i.fa-store {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
    }
}

/* Badge Styles */
.badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/* Icon Styles */
.fas, .far {
    transition: transform 0.3s ease;
}

.btn:hover .fas,
.btn:hover .far {
    transform: scale(1.1);
}

.navbar > .navbar-collapse > .navbar-nav .nav-item:not(:last-child) .nav-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0;
}

.navbar > .navbar-collapse > .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
}

.navbar > .navbar-collapse > .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
    margin: 0;
}

/* SHOP BUTTONS STYLES */
.shop-details-btn, .shop-visit-btn {
    flex: 0 0 45%;
    max-width: 45%;
}

.shop-details-btn {
    background-color: #fd7e14;
    border-color: #fd7e14;
    color: white;
}

.shop-details-btn:hover {
    background-color: #e55a00;
    border-color: #e55a00;
    color: white;
}

.shop-visit-btn {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.shop-visit-btn:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
    color: white;
}

/* LIKE BUTTON STYLES */
.shop-likes {
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.shop-likes:hover {
    transform: scale(1.1);
    color: #dc3545 !important;
}

.shop-likes.liked {
    color: #dc3545 !important;
    animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* MODAL STYLES */
.like-modal .modal-header {
    background-color: #dc3545;
    color: white;
}

.like-modal .btn-like {
    background-color: #dc3545;
    border-color: #dc3545;
}

.like-modal .btn-like:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.bookmark-modal .modal-header {
    background-color: #0d6efd;
    color: #fff;
}

.bookmark-modal .modal-content {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
}

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

.bookmark-modal-instructions {
    margin-bottom: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    background: #eef4ff;
    color: #0b3d91;
    font-weight: 600;
}

/* SHOP CARD SPACING */
.shop-description-container {
    margin-bottom: 10px;
}