/* Modern Design Enhancements for Connect2Print Shop */

/* ========================================
   1. ROOT VARIABLES & MODERN COLORS
   ======================================== */
:root {
  --primary-color: #3b5d50;
  --primary-dark: #2c4940;
  --primary-light: #4a7565;
  --accent-color: #f9bf29;
  --text-dark: #1a1a1a;
  --text-gray: #6a6a6a;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 48px rgba(0,0,0,0.16);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.4s ease;
  --border-radius: 12px;
  --border-radius-lg: 16px;
}

/* ========================================
   2. IMPROVED TYPOGRAPHY
   ======================================== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}

/* ========================================
   3. ENHANCED NAVIGATION
   ======================================== */
.custom-navbar {
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, #3b5d50 0%, #2c4940 100%) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: var(--transition-base);
}

.custom-navbar .navbar-brand img {
  transition: transform var(--transition-base);
}

.custom-navbar .navbar-brand:hover img {
  transform: scale(1.05);
}

.custom-navbar .custom-navbar-nav li a {
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all var(--transition-fast);
  position: relative;
}

.custom-navbar .custom-navbar-nav li a:hover {
  transform: translateY(-2px);
}

/* Active state with modern indicator */
.custom-navbar .custom-navbar-nav li.active a:before {
  background: linear-gradient(90deg, var(--accent-color), #ffd666);
  height: 3px;
  border-radius: 3px;
}

/* Cart badge enhancement */
.badge.rounded-pill {
  background: linear-gradient(135deg, #ff4757, #ff6b7a) !important;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 6px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ========================================
   4. MODERN BUTTONS
   ======================================== */
.btn {
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 50px;
  letter-spacing: 0.02em;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  border: none;
  box-shadow: var(--shadow-sm);
}

.btn:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transform: translate(-50%, -50%);
  transition: width var(--transition-slow), height var(--transition-slow);
}

.btn:hover:before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.btn.btn-secondary {
  background: linear-gradient(135deg, var(--accent-color), #ffd666);
  color: var(--text-dark);
}

/* ========================================
   5. ENHANCED PRODUCT CARDS
   ======================================== */
.product-section .product-item {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid rgba(0,0,0,0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-section .product-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.product-section .product-item .product-thumbnail {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
  padding: 20px;
  margin-bottom: 0;
}

.product-section .product-item .product-thumbnail img {
  transition: transform var(--transition-slow);
  width: 100%;
  height: 200px;
  object-fit: contain;
}

.product-section .product-item:hover .product-thumbnail img {
  transform: scale(1.1);
}

/* Product info section */
.product-section .product-item h3 {
  padding: 0 20px;
  margin-top: 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.product-section .product-item strong {
  display: block;
  padding: 0 20px 20px;
  font-size: 20px !important;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Remove old hover effects */
.product-section .product-item:before {
  display: none;
}

.product-section .product-item .icon-cross {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  width: 40px;
  height: 40px;
  bottom: 20px;
  box-shadow: var(--shadow-md);
}

/* ========================================
   6. CATEGORY CARDS (Shop Page)
   ======================================== */
.category-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  display: block;
  height: 100%;
  border: 1px solid rgba(0,0,0,0.05);
}

.category-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.category-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.category-card:hover img {
  transform: scale(1.1);
}

.category-card h3 {
  padding: 20px;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
  background: linear-gradient(to bottom, var(--bg-white), var(--bg-light));
}

/* ========================================
   7. BREADCRUMBS ENHANCEMENT
   ======================================== */
.breadcrumb {
  background: transparent;
  padding: 20px 0;
  margin-bottom: 30px;
}

.breadcrumb-item {
  font-size: 14px;
  font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "→";
  color: var(--text-gray);
  padding: 0 10px;
}

.breadcrumb-item.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* ========================================
   8. FORM INPUTS ENHANCEMENT
   ======================================== */
.form-control, .form-select {
  border: 2px solid #e1e8ed;
  border-radius: var(--border-radius);
  padding: 12px 16px;
  font-size: 15px;
  transition: all var(--transition-fast);
  background: var(--bg-white);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 93, 80, 0.1);
  outline: none;
}

/* ========================================
   9. CART PAGE ENHANCEMENTS
   ======================================== */
.cart-table {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cart-table th {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 16px;
}

.cart-table td {
  padding: 20px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f3f5;
}

.cart-table tbody tr:hover {
  background: var(--bg-light);
}

/* ========================================
   10. FOOTER ENHANCEMENT
   ======================================== */
.footer-section {
  background: linear-gradient(135deg, #2c4940 0%, #1a2f28 100%);
  color: white;
  padding: 60px 0 40px;
  margin-top: 80px;
  position: relative;
}

.footer-section:before {
  content: "";
  position: absolute;
  top: -50px;
  left: 0;
  right: 0;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%232c4940' d='M0,50 C360,100 1080,0 1440,50 L1440,100 L0,100 Z'/%3E%3C/svg%3E");
  background-size: cover;
}

/* ========================================
   11. LOADING STATES
   ======================================== */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 93, 80, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========================================
   12. RESPONSIVE IMPROVEMENTS
   ======================================== */
@media (max-width: 768px) {
  .product-section .product-item {
    margin-bottom: 20px;
  }
  
  .custom-navbar {
    padding: 15px 0;
  }
  
  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}

/* ========================================
   13. SMOOTH SCROLLING
   ======================================== */
html {
  scroll-behavior: smooth;
}

/* ========================================
   14. SELECTION COLORS
   ======================================== */
::selection {
  background: var(--primary-color);
  color: white;
}

::-moz-selection {
  background: var(--primary-color);
  color: white;
}

/* ========================================
   15. MICRO-INTERACTIONS
   ======================================== */
a {
  transition: color var(--transition-fast);
}

img {
  transition: opacity var(--transition-base);
}

img:hover {
  opacity: 0.95;
}

/* Links with subtle underline animation */
a:not(.btn):not(.navbar-brand):not(.nav-link):not(.product-item):not(.category-card) {
  position: relative;
  text-decoration: none;
}

a:not(.btn):not(.navbar-brand):not(.nav-link):not(.product-item):not(.category-card):after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-base);
}

a:not(.btn):not(.navbar-brand):not(.nav-link):not(.product-item):not(.category-card):hover:after {
  width: 100%;
}