/* ==========================================================================
   DEDE CATALOG STYLES
   ========================================================================== */

/* Product Grid Styles */
.dede-product-grid {
    margin: 20px 0;
}

.dede-search-box {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.dede-search-box input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.dede-search-box input[type="text"]:focus {
    outline: none;
    border-color: #24b18f;
}

.dede-search-box button {
    padding: 12px 20px;
    background-color: #24b18f;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.dede-search-box button:hover {
    background-color: #1a9b75;
}

.dede-filters {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.dede-filters select {
    padding: 10px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.dede-filters select:focus {
    outline: none;
    border-color: #24b18f;
}

/* Product Grid Layout */
.dede-products-container {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.dede-products-container.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.dede-products-container.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.dede-products-container.columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Product Card Styles */
.dede-product-card {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.dede-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.dede-product-card .product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f8f8f8;
}

.dede-product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.dede-product-card .product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #f0f0f0;
    color: #666;
    font-size: 14px;
}

.dede-product-card .product-info {
    padding: 15px;
}

.dede-product-card .product-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.dede-product-card .product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.dede-product-card .product-title a:hover {
    color: #24b18f;
}

.dede-product-card .product-brand {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.dede-product-card .product-price {
    margin-bottom: 15px;
}

.dede-product-card .price,
.dede-product-card .price-range {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #24b18f;
    margin-bottom: 5px;
}

.dede-product-card .shop-count {
    font-size: 12px;
    color: #666;
    background-color: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

.dede-product-card .product-actions {
    display: flex;
    gap: 10px;
}

.dede-product-card .view-product-btn {
    flex: 1;
    padding: 10px 15px;
    background-color: #24b18f;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.dede-product-card .view-product-btn:hover {
    background-color: #1a9b75;
    color: white;
}

/* Load More Button */
.dede-load-more {
    text-align: center;
    margin-top: 30px;
}

.dede-load-more button {
    padding: 15px 40px;
    background-color: #24b18f;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.dede-load-more button:hover {
    background-color: #1a9b75;
}

.dede-load-more button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background-color: #f8f8f8;
    border-radius: 8px;
}

/* Loading States */
.dede-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dede-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #24b18f;
    border-radius: 50%;
    animation: dede-spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .dede-products-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dede-search-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dede-filters {
        flex-direction: column;
    }
    
    .dede-filters select {
        width: 100%;
    }
    
    .dede-product-card .product-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .dede-product-grid {
        margin: 10px 0;
    }
    
    .dede-product-card .product-info {
        padding: 12px;
    }
    
    .dede-product-card .product-title {
        font-size: 15px;
    }
    
    .dede-product-card .price,
    .dede-product-card .price-range {
        font-size: 16px;
    }
}

/* Product Single Page Styles */
.dede-product-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dede-product-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.dede-product-image {
    position: relative;
}

.dede-product-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.dede-product-details h1 {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #333;
}

.dede-product-brand {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.dede-product-price-info {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.dede-product-description {
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
}

.dede-app-cta {
    background-color: #73b4e3;
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.dede-app-cta h3 {
    margin: 0 0 15px 0;
    font-size: 22px;
}

.dede-app-cta p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.dede-download-btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: white;
    color: #73b4e3;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.dede-download-btn:hover {
    transform: translateY(-2px);
    color: #73b4e3;
}

@media (max-width: 768px) {
    .dede-product-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dede-product-single {
        padding: 15px;
    }
    
    .dede-product-details h1 {
        font-size: 24px;
    }
}

/*====================================
    SALES WIDGET STYLES
====================================*/

.dede-sales-widget {
    background-color: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

.sales-widget-title {
    background-color: #f8f8f8;
    padding: 15px 20px;
    margin: 0;
    font-size: 20px;
    color: #333;
    border-bottom: 1px solid #e1e1e1;
}

.sales-items {
    padding: 15px;
}

.sale-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.sale-item:last-child {
    border-bottom: none;
}

.sale-item:hover {
    background-color: #f9f9f9;
    margin: 0 -15px;
    padding: 15px;
    border-radius: 4px;
}

.sale-product-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.sale-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sale-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #666;
}

.sale-product-info {
    flex: 1;
    min-width: 0;
}

.sale-product-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.3;
}

.sale-product-title a {
    color: #333;
    text-decoration: none;
}

.sale-product-title a:hover {
    color: #24b18f;
}

.sale-price-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.sale-price-info .old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 12px;
}

.sale-price-info .sale-price {
    color: #e74c3c;
    font-weight: 700;
    font-size: 14px;
}

.sale-price-info .discount-badge {
    background-color: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.sale-shop-info {
    font-size: 12px;
    color: #666;
}

.sales-widget-footer {
    background-color: #f8f8f8;
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid #e1e1e1;
}

.view-all-sales {
    color: #24b18f;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.view-all-sales:hover {
    text-decoration: underline;
}

.no-sales {
    text-align: center;
    padding: 30px 20px;
    color: #666;
    font-style: italic;
}

/*====================================
    STORE LOCATOR STYLES
====================================*/

.dede-store-locator {
    margin: 20px 0;
}

.stores-map {
    width: 100%;
    background-color: #f8f8f8;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
}

.stores-listing {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.shop-group {
    background-color: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
}

.shop-group .shop-name {
    background-color: #f8f8f8;
    padding: 15px 20px;
    margin: 0;
    font-size: 20px;
    color: #333;
    border-bottom: 1px solid #e1e1e1;
}

.shop-stores {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.store-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.store-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.store-info {
    flex: 1;
}

.store-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.store-shop {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #24b18f;
    font-weight: 600;
}

.store-address {
    margin: 0 0 5px 0;
    color: #555;
    font-size: 14px;
}

.store-hours {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.store-logo {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.store-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.no-stores {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background-color: #f8f8f8;
    border-radius: 8px;
}

/*====================================
    MOBILE RESPONSIVE STYLES
====================================*/

@media (max-width: 768px) {
    .sale-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sale-product-image {
        width: 80px;
        height: 80px;
        align-self: center;
    }
    
    .sale-price-info {
        justify-content: center;
    }
    
    .store-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .store-logo {
        align-self: center;
    }
    
    .stores-map {
        height: 250px;
    }
}

/* ==========================================================================
   CITIES LIST PAGE STYLES
   ========================================================================== */

.dede-cities-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cities-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e1e1;
}

.cities-header h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 10px;
}

.cities-intro {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.cities-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.cities-area-section {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.area-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.area-stats {
    font-size: 16px;
    color: #666;
    font-weight: normal;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.city-card {
    background-color: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #24b18f;
}

.city-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.city-card .city-name {
    font-size: 20px;
    color: #333;
    margin: 0;
    font-weight: 600;
    flex: 1;
}

.city-type-badge {
    background-color: #e8f4f8;
    color: #24b18f;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.city-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.city-region {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.city-stores-count {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.city-stores-count svg {
    color: #24b18f;
}

.city-badge-center {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #24b18f;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-cities {
    text-align: center;
    padding: 60px 20px;
    background-color: #f8f8f8;
    border-radius: 8px;
    margin: 40px 0;
}

.no-cities p {
    font-size: 18px;
    color: #666;
}

/* Breadcrumbs for cities page */
.dede-cities-page .dede-breadcrumbs {
    margin-bottom: 30px;
}

.dede-breadcrumbs {
    background-color: #f8f8f8;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.dede-breadcrumbs ol {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.dede-breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.dede-breadcrumbs li:not(:last-child)::after {
    content: '›';
    color: #999;
    font-size: 16px;
}

.dede-breadcrumbs a {
    color: #24b18f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.dede-breadcrumbs a:hover {
    color: #1a9b75;
    text-decoration: underline;
}

.dede-breadcrumbs li[aria-current="page"] {
    color: #666;
}

/* Responsive design for cities list */
@media (max-width: 768px) {
    /* Reduce breadcrumb spacing */
    .dede-cities-page .dede-breadcrumbs {
        margin-bottom: 10px;
    }

    /* Optimize header spacing */
    .cities-header {
        margin-bottom: 30px;
    }

    .cities-header h1 {
        font-size: 28px;
    }

    .cities-intro {
        font-size: 16px;
    }

    /* Optimize section spacing */
    .cities-list {
        gap: 30px;
    }

    .cities-area-section {
        padding: 20px;
    }

    .area-title {
        font-size: 22px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .cities-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .city-card {
        padding: 16px;
    }

    .city-card .city-name {
        font-size: 18px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cities-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/*====================================
    PAGINATION STYLES
====================================*/

/* Pagination Container */
.dede-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

/* Previous/Next buttons */
.pagination-btn {
    padding: 10px 20px;
    background-color: #24b18f;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.pagination-btn:hover {
    background-color: #1a9b75;
    color: white;
}

.pagination-btn:visited {
    color: white;
}

/* Page numbers container */
.pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* Individual page number */
.pagination-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    background-color: #f0f0f0;
    border-color: #24b18f;
    color: #24b18f;
}

.pagination-number.active {
    background-color: #24b18f;
    color: white;
    border-color: #24b18f;
    cursor: default;
}

/* Ellipsis dots */
.pagination-ellipsis {
    padding: 0 5px;
    color: #666;
}

/* Load More section */
.load-more-section {
    text-align: center;
    margin: 20px 0 40px 0;
}

.load-more-section button {
    padding: 15px 40px;
    background-color: #24b18f;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.load-more-section button:hover {
    background-color: #1a9b75;
}

.load-more-section button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 600px) {
    .dede-pagination {
        gap: 5px;
    }

    .pagination-btn {
        padding: 8px 15px;
        font-size: 14px;
    }

    .pagination-number {
        min-width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .load-more-section button {
        padding: 12px 25px;
        font-size: 14px;
    }
}

/*====================================
    JAVASCRIPT FOR DEDE CATALOG
====================================*/