/* Home Page - PM Stores */

/* Hero Bento Section */
.hero-bento-section {
    padding: 40px 0;
    background: linear-gradient(180deg, var(--bg) 0%, var(--white) 100%);
}

.bento-grid-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 280px);
    gap: 20px;
}

.bento-tile {
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    min-height: 180px;
    box-sizing: border-box;
}

/* Main lifestyle tile - spans 2x2 */
.main-lifestyle {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: white;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-lifestyle .tile-content {
    max-width: 50%;
}

.main-lifestyle .tile-image {
    max-width: 45%;
}

.hero-image {
    max-height: 400px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

/* Category tiles - using navy variations */
.gadgets-tile, a.gadgets-tile {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    background-color: var(--navy-light);
    background: linear-gradient(135deg, var(--navy-light) 0%, var(--gray) 100%);
    display: flex;
    text-decoration: none;
    color: white;
    min-height: 180px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.food-tile, a.food-tile {
    grid-column: 4 / 5;
    grid-row: 1 / 2;
    background-color: var(--gray);
    background: linear-gradient(135deg, var(--gray) 0%, var(--gray-light) 100%);
    display: flex;
    text-decoration: none;
    color: white;
    min-height: 180px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.beauty-tile, a.beauty-tile {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    background-color: var(--blue);
    background: linear-gradient(135deg, var(--blue) 0%, var(--navy-light) 100%);
    display: flex;
    text-decoration: none;
    color: white;
    min-height: 180px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.furniture-tile, a.furniture-tile {
    grid-column: 4 / 5;
    grid-row: 2 / 3;
    background-color: var(--navy);
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    display: flex;
    text-decoration: none;
    color: white;
    min-height: 180px;
    border-radius: 24px;
    overflow: hidden;
}

/* Force background colors to show */
a.gadgets-tile {
    background-color: var(--navy-light) !important;
    background: linear-gradient(135deg, var(--navy-light) 0%, var(--gray) 100%) !important;
}

a.food-tile {
    background-color: var(--gray) !important;
    background: linear-gradient(135deg, var(--gray) 0%, var(--gray-light) 100%) !important;
}

a.beauty-tile {
    background-color: var(--blue) !important;
    background: linear-gradient(135deg, var(--blue) 0%, var(--navy-light) 100%) !important;
}

a.furniture-tile {
    background-color: var(--navy) !important;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%) !important;
}

/* Ensure background images blend with gradient colors */
.gadgets-tile[style*="background-image"],
.food-tile[style*="background-image"],
.beauty-tile[style*="background-image"],
.furniture-tile[style*="background-image"],
a.gadgets-tile[style*="background-image"],
a.food-tile[style*="background-image"],
a.beauty-tile[style*="background-image"],
a.furniture-tile[style*="background-image"] {
    background-blend-mode: overlay;
}

/* Ensure tile content displays properly in link tiles */
a.food-tile .tile-content,
a.beauty-tile .tile-content {
    color: white;
    text-align: center;
    width: 100%;
}

a.food-tile .tile-content i,
a.beauty-tile .tile-content i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

a.food-tile .tile-content h4,
a.beauty-tile .tile-content h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

a.food-tile .tile-content span,
a.beauty-tile .tile-content span {
    font-size: 14px;
    opacity: 0.9;
}

/* Glass overlay effect */
.glass-overlay {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    color: white;
    width: 90%;
}

.glass-overlay h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.glass-overlay p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.link-white {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Tile icon box */
.tile-content {
    text-align: center;
    color: white;
}

.tile-content i {
    font-size: 48px;
    margin-bottom: 12px;
}

.tile-content h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.tile-content span {
    font-size: 13px;
    opacity: 0.9;
}

/* Badges and Text Effects */
.badge-white {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.text-blue {
    background: linear-gradient(90deg, #fff 0%, var(--gray-lighter) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-lifestyle h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.main-lifestyle p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.btn-white {
    display: inline-block;
    background: white;
    color: var(--navy);
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Category Strip */
.category-strip {
    padding: 24px 0;
    background: white;
    border-bottom: 1px solid var(--gray-lighter);
}

.category-flex {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg);
    border-radius: 30px;
    text-decoration: none;
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.category-pill:hover {
    background: var(--gray-lighter);
    color: var(--navy);
}

/* Home Products Section */
.home-products {
    padding: 60px 0;
    background: white;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 28px;
    color: var(--navy);
}

.view-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-link:hover {
    color: var(--blue-dark);
}

/* Product Grid for home */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-box {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.product-img {
    width: 100%;
    overflow: hidden;
    background: #f3f4f6;
}

.product-img img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    display: block;
}

.product-details {
    padding: 16px;
}

.product-tag {
    font-size: 12px;
    color: #007aff;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-details h3 {
    font-size: 16px;
    color: #1f2937;
    margin: 8px 0;
    font-weight: 600;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.cart-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #007aff;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cart-btn:hover {
    background: #0056b3;
}

.empty-text {
    text-align: center;
    padding: 60px;
    color: #6b7280;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
    .bento-grid-layout {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    
    .main-lifestyle {
        grid-column: 1 / 3;
        grid-row: auto;
        min-height: 400px;
    }
    
    .gadgets-tile, .food-tile, .beauty-tile, .furniture-tile,
    a.gadgets-tile, a.food-tile, a.beauty-tile, a.furniture-tile {
        grid-column: auto;
        grid-row: auto;
        min-height: 200px;
        display: flex;
        border-radius: 20px;
    }
}

@media (max-width: 640px) {
    .bento-grid-layout {
        grid-template-columns: 1fr;
    }
    
    .main-lifestyle {
        grid-column: 1;
        flex-direction: column;
    }
    
    .gadgets-tile, .food-tile, .beauty-tile, .furniture-tile,
    a.gadgets-tile, a.food-tile, a.beauty-tile, a.furniture-tile {
        grid-column: 1;
        min-height: 150px;
        border-radius: 16px;
    }
    
    .hero-image {
        max-height: 200px;
    }
    
    .main-lifestyle h1 {
        font-size: 28px;
    }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
    .bento-grid-layout {
        gap: 10px;
    }
    
    .main-lifestyle {
        min-height: 300px;
        border-radius: 20px;
    }
    
    .main-lifestyle h1 {
        font-size: 22px;
    }
    
    .main-lifestyle p {
        font-size: 14px;
    }
    
    .gadgets-tile, .food-tile, .beauty-tile, .furniture-tile,
    a.gadgets-tile, a.food-tile, a.beauty-tile, a.furniture-tile {
        min-height: 120px;
        border-radius: 16px;
    }
    
    .tile-content h4 {
        font-size: 16px;
    }
    
    .tile-content span {
        font-size: 12px;
    }
    
    .glass-overlay h3 {
        font-size: 18px;
    }
    
    .glass-overlay p {
        font-size: 13px;
    }
    
    .hero-section {
        padding: 100px 0 40px;
    }
}

/* Extra small phones (360px and below) */
@media (max-width: 360px) {
    .main-lifestyle h1 {
        font-size: 20px;
    }
    
    .tile-content h4 {
        font-size: 14px;
    }
}
