/* ============================================
   AFGHAN-INSPIRED THEME
   Traditional Afghan patterns, colors, and aesthetics
   Colors are configurable from admin panel via CSS variables
   ============================================ */

/* Afghan Geometric Pattern SVG as background */
:root {
    /* Afghan traditional pattern - geometric diamond */
    --afghan-pattern-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='%23c4956a' stroke-width='1' opacity='0.3'/%3E%3Cpath d='M30 10L50 30L30 50L10 30Z' fill='none' stroke='%23c4956a' stroke-width='0.5' opacity='0.2'/%3E%3C/svg%3E");

    /* Afghan carpet corner ornament */
    --afghan-corner-ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M0 0L20 20L0 40M40 0L20 20L40 40' fill='none' stroke='%23c4956a' stroke-width='2'/%3E%3Ccircle cx='20' cy='20' r='5' fill='%23c4956a'/%3E%3C/svg%3E");

    /* Decorative divider line */
    --afghan-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='20' viewBox='0 0 200 20'%3E%3Cpath d='M0 10H70L80 5L90 15L100 5L110 15L120 5L130 10H200' fill='none' stroke='%23c4956a' stroke-width='2'/%3E%3Ccircle cx='100' cy='10' r='3' fill='%23c4956a'/%3E%3C/svg%3E");

    /* Afghan carpet pattern - intricate */
    --afghan-carpet-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Crect width='80' height='80' fill='none'/%3E%3Cpath d='M40 0L80 40L40 80L0 40Z' fill='none' stroke='currentColor' stroke-width='0.5' opacity='0.1'/%3E%3Cpath d='M40 10L70 40L40 70L10 40Z' fill='none' stroke='currentColor' stroke-width='0.5' opacity='0.08'/%3E%3Cpath d='M40 20L60 40L40 60L20 40Z' fill='none' stroke='currentColor' stroke-width='0.5' opacity='0.06'/%3E%3Ccircle cx='40' cy='40' r='5' fill='none' stroke='currentColor' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");

    /* Afghan tile pattern - mosaic */
    --afghan-tile-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' fill='none'/%3E%3Cpath d='M0 20L20 0L40 20L20 40Z' fill='none' stroke='currentColor' stroke-width='0.5' opacity='0.08'/%3E%3Cpath d='M10 20L20 10L30 20L20 30Z' fill='none' stroke='currentColor' stroke-width='0.3' opacity='0.05'/%3E%3C/svg%3E");

    /* Afghan star pattern */
    --afghan-star-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cpolygon points='25,2 32,18 50,18 36,28 42,45 25,35 8,45 14,28 0,18 18,18' fill='none' stroke='currentColor' stroke-width='0.3' opacity='0.06'/%3E%3C/svg%3E");
}

/* ============================================
   AFGHAN HEADER STYLES
   ============================================ */
.afghan-header {
    position: relative;
    background: linear-gradient(
        135deg,
        var(--site-primary-dark) 0%,
        var(--site-primary-light) 100%
    );
    border-bottom: 4px solid var(--site-primary);
}

.afghan-header::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--site-primary) 0px,
        var(--site-primary) 10px,
        var(--site-secondary) 10px,
        var(--site-secondary) 20px,
        var(--site-primary) 20px,
        var(--site-primary) 30px,
        transparent 30px,
        transparent 40px
    );
}

.afghan-header-inner {
    position: relative;
    z-index: 1;
}

/* Afghan-style logo container */
.afghan-logo-frame {
    position: relative;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--site-primary);
    border-radius: 0;
    clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
}

/* ============================================
   AFGHAN SECTION STYLES
   ============================================ */
.afghan-section {
    position: relative;
    padding: 2rem 0;
}

.afghan-section-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.afghan-section-title::before,
.afghan-section-title::after {
    content: "◆";
    color: var(--site-primary);
    font-size: 0.75em;
}

/* Afghan ornamental divider */
.afghan-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.afghan-divider::before,
.afghan-divider::after {
    content: "";
    flex: 1;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--site-primary),
        transparent
    );
}

.afghan-divider-icon {
    width: 24px;
    height: 24px;
    background: var(--site-primary);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

/* ============================================
   AFGHAN CARD STYLES
   ============================================ */
.afghan-card {
    position: relative;
    background: var(--site-bg);
    border: 2px solid transparent;
    border-image: linear-gradient(
            135deg,
            var(--site-primary),
            var(--site-secondary),
            var(--site-primary)
        )
        1;
    transition: all 0.3s ease;
    overflow: hidden;
}

.afghan-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--site-primary),
        var(--site-secondary),
        var(--site-primary)
    );
}

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

/* Afghan carpet-style border pattern */
.afghan-carpet-border {
    position: relative;
    border: 3px solid var(--site-primary);
    padding: 1rem;
}

.afghan-carpet-border::before,
.afghan-carpet-border::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--site-secondary);
}

.afghan-carpet-border::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.afghan-carpet-border::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* ============================================
   AFGHAN CATEGORY STYLES
   ============================================ */
.afghan-category-card {
    position: relative;
    background: transparent;
    border: none;
    padding: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
}

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

/* ============================================
   AFGHAN HERO/BANNER STYLES
   ============================================ */
.afghan-hero {
    position: relative;
    background: linear-gradient(
        135deg,
        var(--site-primary-dark) 0%,
        var(--site-primary-light) 50%,
        var(--site-primary-dark) 100%
    );
    overflow: hidden;
    border-radius: 0;
}

.afghan-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--afghan-pattern-svg);
    background-size: 60px 60px;
    opacity: 0.1;
}

.afghan-hero-content {
    position: relative;
    z-index: 1;
}

/* Afghan geometric frame for hero images */
.afghan-hero-frame {
    position: relative;
    border: 4px solid var(--site-primary);
    padding: 8px;
}

.afghan-hero-frame::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 2px solid var(--site-secondary);
}

/* ============================================
   AFGHAN BUTTON STYLES
   ============================================ */
.afghan-btn {
    position: relative;
    padding: 0.75rem 2rem;
    background: linear-gradient(
        135deg,
        var(--site-primary) 0%,
        var(--site-primary-dark) 100%
    );
    color: white;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    clip-path: polygon(8% 0%, 92% 0%, 100% 50%, 92% 100%, 8% 100%, 0% 50%);
}

.afghan-btn:hover {
    background: linear-gradient(
        135deg,
        var(--site-secondary) 0%,
        var(--site-primary) 100%
    );
    transform: scale(1.05);
}

.afghan-btn-outline {
    background: transparent;
    border: 2px solid var(--site-primary);
    color: var(--site-primary);
    padding: 0.75rem 2rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.afghan-btn-outline::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--site-primary);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.afghan-btn-outline:hover {
    color: white;
}

.afghan-btn-outline:hover::before {
    transform: translateX(0);
}

/* ============================================
   AFGHAN FOOTER STYLES
   ============================================ */
.afghan-footer {
    position: relative;
    background: linear-gradient(
        180deg,
        var(--site-primary-dark) 0%,
        #0a0a0a 100%
    );
    color: white;
    overflow: hidden;
}

.afghan-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: repeating-linear-gradient(
        90deg,
        var(--site-primary) 0px,
        var(--site-primary) 15px,
        var(--site-secondary) 15px,
        var(--site-secondary) 30px,
        var(--site-primary) 30px,
        var(--site-primary) 45px,
        var(--site-primary-light) 45px,
        var(--site-primary-light) 60px
    );
}

.afghan-footer-pattern {
    position: absolute;
    inset: 0;
    background-image: var(--afghan-pattern-svg);
    background-size: 80px 80px;
    opacity: 0.05;
}

/* ============================================
   AFGHAN PRODUCT CARD STYLES
   ============================================ */
.afghan-product-card {
    position: relative;
    background: var(--site-bg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.afghan-product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--site-primary),
        var(--site-secondary)
    );
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.afghan-product-card:hover::before {
    transform: scaleX(1);
}

.afghan-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.afghan-product-badge {
    position: absolute;
    top: 12px;
    left: 0;
    background: var(--site-secondary);
    color: white;
    padding: 4px 16px 4px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

/* ============================================
   AFGHAN DEALS CAROUSEL STYLES
   ============================================ */
.afghan-deals-section {
    position: relative;
    background: linear-gradient(
        135deg,
        var(--site-primary-dark) 0%,
        var(--site-primary-light) 100%
    );
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.afghan-deals-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--afghan-pattern-svg);
    background-size: 60px 60px;
    opacity: 0.08;
    pointer-events: none;
}

.afghan-deals-frame {
    position: relative;
    height: 100%;
}

/* Top decorative border only */
.afghan-deals-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--site-primary),
        var(--site-secondary),
        var(--site-primary)
    );
    z-index: 10;
}

/* Bottom decorative border */
.afghan-deals-frame::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--site-primary),
        var(--site-secondary),
        var(--site-primary)
    );
    z-index: 10;
}

/* ============================================
   AFGHAN NEWSLETTER/BANNER STYLES
   ============================================ */
.afghan-newsletter {
    position: relative;
    background: linear-gradient(
        135deg,
        var(--site-primary-light) 0%,
        var(--site-primary-dark) 100%
    );
    border: 4px solid var(--site-primary);
    overflow: hidden;
}

.afghan-newsletter::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--afghan-pattern-svg);
    background-size: 50px 50px;
    opacity: 0.1;
}

.afghan-newsletter-content {
    position: relative;
    z-index: 1;
}

/* ============================================
   AFGHAN NAVIGATION STYLES
   ============================================ */
.afghan-nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.afghan-nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--site-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.afghan-nav-link:hover::after {
    width: 80%;
}

.afghan-nav-link.active::after {
    width: 100%;
    background: var(--site-secondary);
}

/* ============================================
   AFGHAN SEARCH BAR STYLES
   ============================================ */
.afghan-search {
    position: relative;
    border: 2px solid var(--site-primary);
    background: white;
    display: flex;
    overflow: hidden;
}

.afghan-search::before,
.afghan-search::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--site-primary);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.afghan-search::before {
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
}

.afghan-search::after {
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
}

.afghan-search input {
    flex: 1;
    border: none;
    padding: 0.75rem 1.5rem;
    outline: none;
    background: transparent;
}

.afghan-search button {
    background: var(--site-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.afghan-search button:hover {
    background: var(--site-secondary);
}

/* ============================================
   AFGHAN SCROLL INDICATOR
   ============================================ */
.afghan-scroll-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 1rem 0;
}

.afghan-scroll-dot {
    width: 12px;
    height: 12px;
    background: transparent;
    border: 2px solid var(--site-primary);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    transition: all 0.3s ease;
}

.afghan-scroll-dot.active {
    background: var(--site-primary);
    transform: scale(1.2);
}

/* ============================================
   AFGHAN DECORATIVE ELEMENTS
   ============================================ */
.afghan-ornament {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: var(--site-primary);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.afghan-ornament-lg {
    width: 40px;
    height: 40px;
}

.afghan-border-top {
    border-top: 4px solid var(--site-primary);
    position: relative;
}

.afghan-border-top::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--site-secondary);
}

/* ============================================
   AFGHAN MOBILE MENU STYLES
   ============================================ */
.afghan-mobile-menu {
    background: linear-gradient(
        180deg,
        var(--site-primary-dark) 0%,
        var(--site-primary-light) 100%
    );
    border-left: 4px solid var(--site-primary);
}

.afghan-mobile-menu-item {
    position: relative;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.afghan-mobile-menu-item::before {
    content: "◆";
    position: absolute;
    left: 0.5rem;
    color: var(--site-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.afghan-mobile-menu-item:hover::before {
    opacity: 1;
}

.afghan-mobile-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .afghan-section-title::before,
    .afghan-section-title::after {
        display: none;
    }

    .afghan-category-card {
        padding: 1rem 0.5rem;
    }

    .afghan-category-icon {
        width: 60px;
        height: 60px;
    }

    .afghan-btn {
        padding: 0.5rem 1.5rem;
    }
}

/* ============================================
   DARK MODE ADJUSTMENTS
   ============================================ */
[data-theme="dark"] .afghan-card {
    background: var(--site-bg);
    border-image: linear-gradient(
            135deg,
            var(--site-secondary),
            var(--site-primary),
            var(--site-secondary)
        )
        1;
}

[data-theme="dark"] .afghan-category-card {
    background: linear-gradient(
        145deg,
        rgba(30, 30, 30, 0.9) 0%,
        rgba(20, 20, 20, 0.9) 100%
    );
    color: white;
}

[data-theme="dark"] .afghan-product-card {
    background: var(--site-bg);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .afghan-search {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--site-secondary);
}

[data-theme="dark"] .afghan-search input {
    color: white;
}

/* ============================================
   AFGHAN WEBSITE BACKGROUND PATTERN
   ============================================ */
.afghan-bg {
    position: relative;
    background-color: var(--site-bg);
}

.afghan-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M40 0L80 40L40 80L0 40Z' fill='none' stroke='%23000' stroke-width='0.3' opacity='0.03'/%3E%3Cpath d='M40 15L65 40L40 65L15 40Z' fill='none' stroke='%23000' stroke-width='0.2' opacity='0.02'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 0;
}

/* Card with pattern background */
.afghan-card-pattern {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(250, 250, 250, 0.98) 100%
    );
    overflow: hidden;
}

.afghan-card-pattern::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 0L40 20L20 40L0 20Z' fill='none' stroke='%23000' stroke-width='0.3' opacity='0.04'/%3E%3C/svg%3E");
    background-size: 40px 40px;
    pointer-events: none;
}

/* Section with subtle pattern */
.afghan-section-pattern {
    position: relative;
}

.afghan-section-pattern::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 5L55 30L30 55L5 30Z' fill='none' stroke='%23000' stroke-width='0.2' opacity='0.025'/%3E%3Ccircle cx='30' cy='30' r='3' fill='none' stroke='%23000' stroke-width='0.2' opacity='0.03'/%3E%3C/svg%3E");
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.afghan-section-pattern > * {
    position: relative;
    z-index: 1;
}
